#development
1 messages · Page 175 of 1
and much superior for anything but home usage
maybe even for home usage, but people are just too used to windows
for servers you use a headless (no visual interface) version of whatever distro (version/flavor) you choose
iow, you controle the vps through commands, just like you do with bots
How do people even read python or c sharp? The only language that makes sense to me is javascript.
Every language looks logical and makes sense if you play with it a bit
For a long time I thought that php was black magic, but I'm starting to get used to it in my free time
Every bit of code I write is in javascript so that might be why
train your mind to think in abstract concepts
reading other languages will flow to you naturally then
it's just a lot of practice
Like cry said, it’s less about syntax and more about the concept itself
Most languages don’t have syntax that is so uncommon or difficult to understand that you have to learn the language to understand a snippet of code
(Some notable exceptions though, namely functional languages that have less commonly seen syntaxes)
Rust
learning it right now, im positive it rewired my brain 😭
c# inherits the structure from c, whom js also inherits
so they're pretty similar once you look from higher up
no more direct accesses, now all your memories are borrowed
makin a bot and doing the one thing i hate the most, embed navigation
and im strugglin
because this message collector only works once
(with max: 1)
then when I create another
it won't collect the interaction
the first time createCollector is ran, is with the reply to the original interaction
and if I interact with a button, it works and it runs the code within the .once("collect")
but the code in there about createCollector doesn't work
It does call it but any interactions in there don't work
it does end with 'idle' as reason
Prove it
If you can't prove it then why bother promoting it?
Replit is probably the worst option to use for bot hosting
because my phone died
I just gotten inside of my car
Point is, the "host" you suggested holds no merit for a recommendation
This is for a variety of reasons, namely the concern of the quality of the product. The goal of a firm is to maximize economic profit, thus in order to break even and reduce total fixed cost, they cut corners. The quality of said hosting that I would receive is significantly worse compared to a VPS (which is recommended) provider, such as Henzter. The suggested "host" exploits planned obsolescence by providing poor plans and tempting or forcing you to upgrade to their better plans. The investment made by paying for that host would be better spent on a quality host whose service has been relied on and tested on.
In addition, using the suggested "host" removes granular control over how you are able to run your bot. You trade control over for convenience, which can lead to serious issues. Dependency management is the most well known issue, as hosts that claim to provide hosting for discord bots often include outdated libraries, shared CPUs, shared IPs (which lead to ratelimits, and the infamous cloudflare ban), and poor specs. These create an environment that is designed to fail for discord bots.
I do not recommend doing it this way
Making then destroying then making again
Just have it collect until they either close the menu or a certain amount of time has passed
And use filters to make sure you’re only collecting from the person who used the command if need be
Yeah in the d.js I heard that I don't have to recreate it
Will check it out
Useless since I'm using ephemeral in guilds and not in DMs
It will still require some kind of filter iirc
why though
there are only 2 btns
and can only be used by 1 user
can use any else
gonna have to pay up
-
Pay up - Pay up and use a VPS provider. My pick is Heznter, but see the list of vps providers for other options. More than likely if you are not an eligible HS or college student, this is your option.
-
Self Host - If you are able to self host your own server, then go for it. This is really the only "free" way if you already pay for your electricity bill and have the equipment to do so. Raspberry Pis oftentimes are great for this.
-
GitHub Student Developer Pack - IF you are a enrolled student in an HS or college (you will need to either provide an valid student ID or proof of education of your HS or college), then you may apply for this deal. More info about this can be found here (https://github.com/orgs/community/discussions/17814). The deal offers $200 free credits on DigitalOcean for 1 year, so if you are a student and need to host your bot, go for it.
did you see this? #development message
if none of these three options work, then tough luck
yes
wait
"The deal offers $200 free credits on DigitalOcean for 1 year, so if you are a student and need to host your bot, go for it."???
Well you need a valid form of ID from your high school or university
you will need to either provide an valid student ID or proof of education of your HS or college
i live in lebanon we don't have those here
i'd suggest doing some research on it (here is the faq: https://github.com/orgs/community/discussions/17814) and see if you are eligible
its free again right?
yes. the github student education pack is free itself
as long you are a valid student and can demostrate proof of it
ill try ty
np
thank-q, doin it like this works.
(do I have to remove the listener for the "end" event? is it not automatic?)
https://paste.ofcode.org/s5xnDUEdUEHKHTNk6wZ2GU
WARNING discord.gateway Shard ID None heartbeat blocked for more than 20 seconds.
help
Once it’s done collecting it’s destroyed
ok ty

why is my code spamming congratulations message
Congratulations, @xxx! You've leveled up!
Congratulations, @xxx! You've leveled up!
Congratulations, @xxx! You've leveled up!
Congratulations, @xxx! You've leveled up!
Congratulations, @xxx! You've leveled up!
Congratulations, @xxx! You've leveled up!
how should I upload images and store images for a backend server?
it is okay to just store it in some folder with a unique id name?
and how can I protect it from viruss
you need a CDN
also take a look at https://dev.to/megajakob/how-to-build-your-own-cdn-io1
why is my bot sending
Congratulations, {member.mention}! You've leveled up!
message thrice in the channel??
Does anyone have a server template I can use with a bunch of channels with role overrides?
Heya, so i am using prisma x postgresql on my express app, and the thing is. I want to generate an id for the new users containing both letters and numbers up to 8 - 10 characters. Is there a way i could do this directly through prisma?
Because if i do create the id through express i'd have to query the db and make sure the id doesn't already exist...
my approach is to pray
Is it done using ai image recognition?
Quite silly considering how threads are channels
yes
all working perfectly, now live
is it with a pretrained model?
or did you train it yourself?
Definitely gonna check out the github page
it's Microsoft resnet-50 model
via cloudflare AI workers
So I could run Ms resnet 50 on cloudflare ai workers?
Might have to give it a go
give it something nsfw
that uses a different API trained on nsfw, gore, porn, drugs and stuff
which is a premium feature as it is more expensive to call
so it doesnt regognise?
how can I serve images with graphql? should I just return the base64 string of that image
sounds really inefficient
it is
if it's related to your question about serving images earlier, the best way is still to use a CDN
you can then store the URLs that point to those images inside of graphql
you can technically cheap out completely by having your main server also act as a CDN
but i strongly advise not to
it brings up major security concerns
I don't really want to expose my cdn
yeah
so what I wanted to do, is make my graphql server to a cdn gateway
query the image, encode to base64 and then return to client
this is what I thought
but returning as base64 string sound inefficent to me
is there any particular reason for this
a CDN is meant to be exposed
I don't know, i'm currently using a test product from cloudflare R2. And it sounds dangerous, if I can't limit who have access to my cdn
what does the process look like for the end user to get the image they want
is it a discord bot or something like that
nope, a mobile app
it is for uploading image, and then display images
I guess, I will make a cloudflare worker as a gateway for that and then have a jwt authentication
yup
you need an authentication layer between the user requesting the image and your CDN serving it
here's an article i found, it seems applicable to your problem
granted it's focused on using AWS but i'm sure you can get something out of it
thank you, I will read it now
That's why I use WinSCP 
Damn last time I used Filezilla was when Jailbroken PS3s were in its prime
🥰
Damn I was trying to think of an app to manage my cdn with. Idk why I didn't think of Filezilla 👀 that would be so easy
filezilla
Yeah I used to use it a lot. Haven't used it in ages!
i actually rarely use filezilla
just use winscp for sftp
i dont know why
considering filezilla is much larger
MacOS moment

I can't get winscp on mac
Damn this looks good 👀
Cyberduck for mounting volumes in the file explorer. Available for Mac and Windows.
Mount my cdn in the native file explorer 👀
Now that would be pog
4 or 2 tab
Aight, spent the whole day but managed to get everything working
Gaming on linux is pretty decent might i say
Cyberpunk running at 60 fps (monitor cap) on ultra + raytracing
Also now I have an useable terminal yay
Hi evreyone ,How are you ?
I have a problem ,my bot is approvide but ı have a problem,I can't get it the presence intent problem.
where can i find bot dev?
Search on Fiverr
u know someone?
As Nynu said, use Fiverr
How to can get it ?
Also, just because I'm curious, you want a bot dev but you list a Github on your profile stacked with enough knowledge to make a bot quite easily. Is it not yours? lol
I don't know
Hi
Hey @small acorn
i am looking for discord bot for solana(I prefer India, Pakistan and Indonesia)
dm me plz
Sure, I'll start writing now
why is it when i run !level command my bot goes all crazy it starts to remove and add level roles and it spams leveling up message in the channel??
ping me if anyone decides to help
You should contact discord support
That's the most logical thing to do
const canvas = Canvas.createCanvas(400, 400)
const ctx = canvas.getContext("2d")
ctx.font = '60px sans-serif'
ctx.fillStyle = "#000000"
ctx.fillText("Welcome", 200, 200)
im using this to add text but the text is not showing
i tried adding custom font (.ttf) then it throws pango error: unable load font file
sans serif isn't a font, it's a typeface
what should i use then ??
thank you very much
it's an article from 2017, my bad, it's probably outdated by a margin
this one is from 2021
You're writing black text on a black background
Did you expect to see that? 
nope i have a bg image
Then why not show the whole code instead of that snippet?
its too big 😅
oh okay!
No thanks , Discord support is 3 decline.
Because my bot does not send data and rejects 3, I don't know how to use the Discord api.
Watch guides, read some threads on forums or reddit and sooner or later you will understand how to use it
Okey thank you
how slow will this run on 8gb vram https://fs.rjns.dev/v/NJTlXCeRbvMtZHIBbw
help; text is not showing https://srcb.in/gUUh9Xs9Qz
You're clipping into the context of the canvas, and staying there which makes anything you draw to not show up at the top-level
You should save the context (ctx.save()), clip and draw the stuff and after you're done drawing in that area, restore the context (ctx.restore())
it worked, thank you very much!!!! 🫡
You're welcome
Bot Developers. Do you prefer to use slash commands or the original message content commands? I'm trying to decide which route I should go.
Slash commands provide more possibilities and thanks to this you don't have to check whether the given value is a user or a channel/role, it is already determined by the option type
They are probably more convenient for users as well
That is true. Do you feel limited by the API rate limit for command updates or the limit to the number of global commands?
No, I've never had such a problem but my bot is only on 1.7k servers so it's still small. I doubt any bot will reach the limit of 100 global commands. The number of commands is not an indicator of the quality of the bot, so the fewer the better
Thanks for your response.
I prefer orignal message content commands, because when trying to find a command quickly using / which is prefix for all slash command bots, you get multiple suggestions and have to look for the command in the bot you want and orignal messages are more flexible ig
So when you have a certain prefix, which maybe whatever, you can easily use the command for the bot you want
Configurabke
Good bots usually provide a way to change prefix for current server or may have a very unique orefix
Yes, but the developer has to add it and some bots may not have it
It's must have for message content commands bots
Skill issue 😢
well you've to add everything that exists in ur bot uk
Also, is your bot approved by discord?
no lol
I started on this one just a while ago
Then you will need a good explanation for using message content intent
, Thats only thing I don't like about normal message commands
personally, I prefer message-based commands because they're more customizable as to how I parse the input and have no limit to how many commands I could have or how many levels.
Also I can have unprefixed commands, which kinda matters in my case.
if you don't care about any of those points, there's little reason not to go slash
up to you
(Good) things that prefix commands support that slash doesn't:
- Easy to hide/lockdown (owner maint commands)
- (Slightly) faster to deploy and iterate on
- Can be invoked by other bots
- Supports lists of models for parameters
- Backwards compatibility
- Arbitrary depth of grouped commands, parent commands can be invoked
- No limit on number of commands
- Easier to copy-paste repeated command invocations
(Good) things slashes support that prefixes don't
- No reliance on message content intent*
- Built-in democratized permissioning (per-server, no need for code deployment)
- Discoverable via a searchable ui, no help command needed
- Ephemeral responses
- Guided UI (tells users what parameters and types are expected, prompts them for things like users or attachments)
- More lenient rate limits
Things that both support:
- Interacting with any normal discord endpoint (create a thread, upload an emoji, etc)
- Sending views
The guided ui is a huge bonus for more complex commands but for the majority of discord users (not new users) I think will prefer using the older prefix commands cause they’re way easier to type once you know the command
hey guys
i am in my 2nd year of computing science at my local university. Is it already smart to maybe create a github to maintain what projects i have created, what i can do etc etc in case i can use it later to get jobs faster?
I kinda liked the idea of having such portfolio
definitely
it shows you're capable of building something
i put up my high school graduation project on my github and i'm 90% certain it is what landed me my current job
Not only is it good for future job prospects but it's also a great way to back up code or as a place to go when you encounter a problem you've handled before as you can just re-use that code snippet then
YOU WERE AT 1ST YEAR??
I am working on the backend of an app and i retrieve form data including an image from a form.
Now this is the first time i handle images, could i store them in my database directly (prisma x postgresql) and have it easy to access at the same time?
what about it
technically you can
but if you're gonna be serving them to browsers via img links or similar, then you lose the ability to serve them directly from the file
you can cache them and make in-ram perma-links, but that can cost quite a bit of memory if its a lot of images
fetching them from db every time is not too bad as long as the images are not multi-megabyte sized
you can also let the browser caching mechanism do the job of caching them client side
@earnest phoenix @civic scroll 
The only difference I see is that you become a catgirl
For the questions they asked here I'd imagine they'd be on last year
i guess they're just ambitious

The chad char*
What are some email clients that are better than RoundCube? 👀
I've looked at Google WS, not sure how to safely transfer my emails there.
What does this exactly mean. Also thank you
Rip tho
They replaced windows mail client with outlook
Which really feels like they just embedded the site in an electron app and called a day
This looks like dark magic, I never thought u can do it only with vanilla js
Has anyone worked with konvajs before ?
ie, if youre gonna use the uploaded image on the apps's html at some point like <img src="imageurl.jpg">
is that using browser functions like chrome's extension api?
chromes extension api does provide methods and ways to interact with other browser tabs
looks cool tho, despite the draw lag xd
I looked at their github repo, they use local storage and window location
what i did was just used multer to send the images over to a folder on my express app, set a limitator of 5mb and then added the image path on the db
ah, that is also possible if the domain is the same, but pretty costly since it involves constant reading/writing even if no changes are detected
awkward
depends on what email client suits your needs best
Hmm, would you be able to elaborate on why?
I like prefix commands but will I have to switch to slash commands once my bot hits 100+ servers?
It's up to Discord. In most bots, yes, because prefix commands is not a sufficient reason for your bot to have approved message intent
It is possible that if your bot is, for example, a moderation bot that is based largely on message intent, then they would allow you to use it
I don't work in Discord, their support will assess whether your bot qualifies
Well, you can use html + css so I guess you can
I tried to use css but it didn't work or maybe I'm doing something wrong,
Is only inline css is allowed or css with style tag is fine?
both is good
though pay attention to css specifity levels
some styles depending on how you define them, gets prioritized over others
Yea I got it, I removed the html and body tags and it worked. Thank you for your time
warn: an html document must have one html tags
and one body tag
<html>
<head>
<!-- metadata (title, imports, meta) shows here -->
<!-- you don't see those information except for the title -->
</head>
<body>
<!-- what the browser shows you -->
</body>
</html>
I tried with the whole code including the html tag but it won't work. I thought I was writing in the editor so there might be <html> tag by default so I tried after removing it and it worked lol.
it won't
the browser just tried to add that in for you
oh
ah also in the beginning,
<!DOCTYPE html>
<!-- html and the rest -->
when in doubt, open dev tools
(F12 or Ctrl + Shift + I)
in Elements tab is what the browser sees as code
you can check there to verify structure of your document
as well as applied styles on an element
Ctrl+U
alt+f4
What?
Being able to immediately see "this doesn't belong here" or "this could be null" really changed things
I don't really do js either
Looks like you do cpp
I wrote my first ever server side js this week, I mainly do C++ and PHP
my bots are C++

brain touching a language other than c++
with PHP Dashboards
thats blasphemy
lovely flexible blasphemy
I want to expand it to other things but I'm not great at it yet
I looked at rust
Idk I didn't get far
Tried to write a simple API with it but the docs were guh
Rust is a specific use case kind of thing.
I see rust this rust that on GitHub every fucking day
Also, using a language just because others use it is a no go
Use a language for what its intended to be used for, and if you need it
I'm not sure what rust is for, but I haven't looked into it much
It seems almost like a cpp rewrite
kind of is
the idea is good, it's C++ with ..... safety
but the safety comes at the cost of ridiculous complexity
Hm
learning curve like mt Everest
Christ
Like right now I work at a school it, I want something to put on my resume
I would never, any fucking warning or error makes me want to fucking explode
I mean
and in my experience there's politics around the language, like a standards committee that got everyone worked up about patents (don't take the languages name in vain!) and if people in America can bring guns to conferences
sometimes you gotta use unsafe rust to get things done or so null has told me
My comfort language is typescript at the moment
Typescript is were I started back in 2018
actually I lie
it was python then typescript
I've unlearned python, haven't touched it since high school (about 3 years ago)
Yea so its nice to know a lot of things but dont expect to master them all
my day job is php
my "night job" which takes as much time as my day job and started out as a small side hustle is c++ and php
Php syntax looks horrific to me
you're probably looking at shit PHP then
True
please tell me not w3schools
i dont really give a shit about politics around the language kekw
or chatgpt
or politics in general
No ai at all
i just enjoy the language as is
I used to use GitHub copilot for class and it kinda fucked up my learning
AI should be pronounced "AIIIIIIIII why did it do that"
I found I didn't know how to actually use a lot of stuff
wait brain
I don't blame you
isn't your new bot ai related?
yes lol
If it's popular and profitable I'm not gonna stop you
so I often ask "AIIIIIIII why?!?!?!"
lol
it isn't profitable YET, right now it's just sucking up triviabot funds
I had to pay for a lot of stuff
train the model yourself or nah?
a dedicated server, ddos protection GRE tunnel, several paid APIs
I host my OCR bot on a hetzner instance
added additional training to an existing model
I didn't train it myself
your bot does OCR?
Uses tesseract "best" data
I don't think this is advertising?
nah youre fine
it has huuuuuuge mem leaks because libtesseract has memory leaks ...
I haven't seen anything too bad
But then again, it's only in a few servers
I couldn't find a better lib that works with JS/TS
my bot is only in a few too but one of them is actively using it and has 750,000 users
you could always use python
python has tons of libs for ml stuff
not many libs out there for js
ew
python is slooooow af and as memory efficient as a sprout
I don't like python tab syntax
and all the "python" libraries for AI, are actually C++ libraries for AI, e.g. tensorflow
with python wrappers
Also kinda hate python devs, tired of sifiting through entire projects crammed in multi thousand line files
Like holy shit split your code up
I know
that's the fault of the dev not being shown better
so I been burning the candle both ends to get my bot in release
I'm considering gaming tonight
Starfield becons
I been poaching ideas from degore and anti nsfw left right and centre
Half the time I can't get the python to run because it requires so very exact specific rc version of python 2
Like fine, I get it for things made in that time
brain who you calling grandpa 
But I feel like there are people still developing on python2 and making no effort to update
python is kinda silly how they made two totally incompatible versions of the same language
like perl with 5.8 and 6
it never works out well
the guy who's 43 tomorrow is calling youngins grandpa. get off mah lawn!
But yeah I was trying to install howdy (a facial recognition authentication program for Linux) and it's all python2
And python 2 for the most part has been ripped out of the aur
How so
slow, unreliable, and insecure
might as well just have a hello world as your PAM scripts
Insecure caught me yeah, it looks like it's not actually using both cameras or something to construct a 3d model
you can trick it with a photo held up to it 😂
I specifically bought an IR camera for windows hello
my work laptop has an IR camera
I'm not sure about the security of windows hello but
I got fingerprint working, I use it as 2fa on work github
I got a Lenovo 500 RGB IR camera
I got a stack of yubikeys for 10 bucks
Some mad discount they had a while back
nice
I got google titan too
I don't use those tho because whenever I need to authenticate im not hear a usb port
I suppose yeah
usually it's on my mobile where it's asking every damn day for 2fa because mobile app devs don't know when to stop fucking updating apps
we get it you want to change the damn name again for app store optimization, QUIT IT
Lol
lol
I've been looking for a project to work on
Idk what to do though
I just hope my AOCR bot gets attention
Build off there maybe
But it's kinda feature complete? I don't want to add anything that would require user options or anything
Supposed to be fully plug and play
talking of..... i moved to desktop
trying to hold a conversation when tapping on a phone with two thumbs gets annoying after a bit
Yeah fair enough
your bot open source?
heres mine
look under the directory tessd to see how i handle tesseract
best way to deal with its leaks: let the OS sort it out 
it has tons, thats the problem
there is no "C++ package manager" like there is pip, npm, composer
Oh fun
but i purposefully made it difficult to compile my bot 😉
Trol
i dont exactly want people to self host it, i made it open source to keep me on my toes
if the code is there for all to see, i dont get lazy and write messy code
because if i do someone may criticize it
I didn't look at any other examples when I made mine
and yeah its still great as example code
Was hoping it would be kinda unique
even if you dont build and run it as one
But here we are lol
im surprised to meet someone else making an OCR bot tbh
when i looked it was pretty unique, we are the only two active ones.
there's tensorflow for js afaik
you can even make AIs in C++
double the hell
I was in a server that had a lot of people bypassing automod with emojis, images, etc
there are a couple others but theyre crap... one will only scan ONE image attached to the last message if you do "!scan", and it has a big note on its bot page saying "one at a time please!" .... or what? your mom will get angry that her desktop is churning away at 100% cpu?


yup, im using it! 😄
why not use the one for C++ 
i didnt have the time right now to port a ton of existing stuff to C++, and i wanted to get the bot released this side of the new year, so i put the js bit inside a docker container, wrapped it in a simple json api using express, and i call it from the C++
it does make it really easy to manage
the docker container is pretty much atomic, so i could k8s it
easy scaling




One day I will start working with docker
Idk I don't like mixing languages too much
Maybe I'm just thinking wrong
Or maybe I'm scared of leaving the package managed ecosystem
its then called in a thread, like this https://github.com/brainboxdotcc/beholder/blob/main/src/tensorflow_api.cpp#L46-L49
mixing languages is how the best programs work
discord is a mixed bag of languages, theres bits of js, bits of python, bits of rust, elixir...
triviabot is mixed ecosystem, PHP, C++ and some bash
but even when i rewrite the tensorflow stuff in C++, it will probably still be a docker container that exposes an API
I just wanted a bot with little to no config, and seamless
via an apache or nginx module or something
mix C++ with Python 
hah, you saw my example config right? 😄
Lemme look
hey, youve not lived until youve integrated PERL with C++, using PerlXS
im sure pretty much every language has support for ffi with C/C++
Reminds me of my first bot that had server specific settings, I made a json database
It was hell
assembly then
yeah, beholder an triviabot use a mysql database, this is just config constants
It's uh
Still in production

The fact that I accomplished a json database without any sort of type safety is kinda guh but
It worked
And it still does somehow
yeah
its just like having a square wheel
put enough torque into it, and it will work by brute force, but it wont be a comfy ride
My first experience with mongo db was years ago, and NOT the docker instance
might want to look into something like mongo or redis
So like, I just never got it working and was kinda inclined to not use it
you could try mysql
Oh no I use mongo now
but i hear javascript and typescript have the worlds crappiest mysql libs
Just not then
https://github.com/brainboxdotcc/beholder/blob/main/src/database.cpp
this is my database lib
One of my more recent bots https://github.com/WolfPlugs/GiBBy/blob/main/src/mongo.ts
its really simple, i can use it like this:
std::string size{"massive"};
int order_no = 69;
auto rs = db::query("SELECT fail FROM shipment WHERE order_no = ? AND size = ?", { order_no, size });
for (const auto& row : rs) {
std::cout << "Fail is " << row.at("fail") << "\n";
}
it automatically caches prepared statements
Ic
so if i use the same query again with different parameters it executes it lightning fast
And that's mongo?
no, its mysql 8
Ah
well, the mysql c connector doesnt look like that
and the mysql c++ connector is ASS
it tries to be like jdbc
True
I put a strict license on my OCR bot because I specifically do not want shit bots like mee6 taking any of it
they wont steal your code
I know
they could implement what you made in a day, but they wont
Ye
what stops them is inertia, they are led by bigger company goals
unless they saw massive money in it... they wont add it, thats why they added nft and gpt chat bots
thats where they see the money being
any ideas why html <img name="sales-funnel" src="/../images/sales-funnel.png"> is returning 404 ?
process.on('unhandledRejection', (error) => media.error(error));
// app.use(express.static('js'));
app.set('view engine', 'ejs');
app.set('views', path.join(__dirname, './src/views'));
app.use('/images', express.static(path.join(__dirname, 'image')))
app.use(express.urlencoded({ extended: false }));
app.use(express.static(path.join(__dirname, './src/images')));``` my middleware.
The mysql and maria drivers aren't the worst thing ever, but I prefer postgres especially since I can optimize queries for duplicate prepared statements and batch queries together that way
probably because you are trying to use images which has been set to image folder which doesn't exist
app.use('/images', express.static(path.join(__dirname, 'image')))
=>
app.use('/images', express.static(path.join(__dirname, 'images')))
this should work if I'm correct though I never used path.join
has anyone used konva?
yh i had images set, reason i changed to image was because i saw a post on stackoverflow of somwone sayin that was the fix. wasn't for me.
^ fixed: app.use('/images', express.static(path.join(__dirname, './src/images')))
hey guys
i have created a website
and use dvh and dvw everywhere to make it dynamic
but is that better for a website than px?
dvh and dvw can fuck up a lot... and px is just a constant. What do you guys think?
Nice, || I almost thought I got ping from Top.gg cuz my bot got rejected
||
Remind me again what is dv unit
But well, from personal experience, use vh/vw for containers and px for content
Some people do use zoom feature, which gets ignored if u use relative units for everything
can i see
dynamic viewport, its pretty much a mobile-only thing
Hello Tim
hai
nah
it's also for compatibility between browsers
safari and google have a different type of fov
etcetc
browsers dont have dynamic elements like mobiles do
like the url bar that disappears when you scroll down, and re-appears when you scroll up
yeah but safari as an instance has a topbar which is less smaller than google chrome
i had problems with it before
hence i switched over to dvh and dvw which handled the problem for me
soemone in this chat had suggested it for me.
you mean from vh and vw to dvh and dvw?
yeah
any ideas why data is null?
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
possibly because they are on seperate tabs, but still at least phone number be entered? not too sure
I could be wrong but I don’t think you need the #cForm when calling getElementById, just cForm
question
Answer
yes, that's for querySelector
there was never an error help request here
?
Oh
clusters are "collections" of shards, they're basically different instances of the same bot so you can balance resources more easily
carl bot has a lot of servers to manage so they run multiple instances of their program which each manage several shards, which in turn each manage a couple thousand servers
Any dpy versions?
here's a good idea of it
not sure
There's probably something available
But if your bot gets big enough to need clustering, chances are you're shooting yourself in the foot by using python
It won't get big enough I doubt, but what would be the limit to switch to clusters
That github repo says 14k
For internal shard limit, which I assume is when you'd want to switch to clusters?
It depends on your performance needs but yeah that's probably a good idea
I'm an avid python hater so I might be a little biased here but python is incredibly slow, you'd probably be better off writing your bot in a different language if it comes to the point where performance is an issue
I have lots of resources on my server so I doubt it
Unless I obv get like 1m servers
Which I won't
Ease of development comes at a cost 😉
To clarify, python isnt a bad language option for this, but there are already solutions out there that act as gateway proxies in languages that are more efficient such as rust
just realized this comes from the D++ docs, god these docs are beautiful
thanks brain
My architecture is I have my gateway nodes open a ws connection to my website and my website proxies relevent events to workers
My website handles music queues, so the system is a little backwards and kinda depends on a somewhat monolithic design where the bottle neck would be the website overall
But I can always multithread it or spread route handlers across machines with cf
The alternative would be putting more strain on my music player nodes by having each cluster manage a subsection of the total queues and give actions to the player nodes and gateway actions, plus the queues being duplicated on the website for states because of a dashboard
I'm not sure what the most optimal way to do things is tbh
any solution I think of has the website as the bottleneck
yeah I like how I currently have things
How do you mention a command? Like #getting-started but a command
How do you get command id
From the response from bulk overwrite application commands or overwriting individual commands
or get application commands I guess
Also on desktop, you can right-click on the box with the name and description of the command
You will see an option to copy the command id
Hey can anyone help me out with svg paths?
data: "M366 281 H273 t 10 0 10 10 V 120 H180",
// data: 'M180 140 H290 t 10 0 10 10 V 200 H400'
These 2 similar paths are yielding two different results, but why
Basically trying to understand why this is happening
Also this is happening because of the “t” but I want to use it to draw a curve on the line
For me it's neither early nor late 
Timè doesn't exist
Time exists all around us

ping me pls when they here
https://codepen.io/mrtester/pen/PoqXPya the sandbox im trying it out in

if (lfgBo) {
errorEmbed2.setDescription(
errorEmbed2.description + "``Best out of`` " + `${lfgBo}\n> `
);
}
how to append to an embed description?
This above returns me undefined and then best out of...

I'm sure there could be better ways to do it, but what I've done is find the message the embed is at. Then do <message>.embeds[0].description for the content and store it in a variable.
ahh i see
thank you
but what if i don't send the embed, like your suggesting sending a message and then editing it right?
try logging errorEmbed2
im doing what you are doing and it works for me
just check if the property exists
Well, I was under the assumption it was sent already correct. I've never had an instance where I had to grab it before sending it. If you're always not sending it. Why not store the description as a variable then and when your creating the first embed use said variable then for the 2nd one if you need to add to it you can just reference it maybe?
it's saved within data
Data?
so i apparently had to do embed.data.description
bump 
What is the use of shards in a Discord bot ?
I disagree
hey guys i a numerical output variable i would like to transform for my decision tree
really not sure whether this is the perfect server but got no other place to ask this
this is my charges (outut variable) plotted.
i must threshold this data into 3 categories: low risk, medium risk, high risk.
what would be the best approach?
i got two options here:
- either we say 0-33th percentile = low risk, 33th - 66th = medium etc etc.
- we look at the above graph and say, there's a linear relationnship of 20k >, hence we group them together into high risk. everything till 5000 will be medium and then 5000-0 low risk
there's a certain point in your bot's growth where there's too much traffic over a single connection, sharding breaks up that "big" connection into multiple "smaller" ones
Thanks
hey guys can someone help me maybe someone has worked with the i18n next-intl and im making a middleware for the profile page login and sign up to not be accessed but how can modify my middleware that i na use the routes to accept the locale lang and then to show the path too
Why isn't this working? the bot is added to the guild let channel = client.guilds.cache.get("ID").channels.cache.get('ID');
Is the channel in the cache or not?
just installed Discord.js and getting this error anyone know why?
THIS IS A FRESH INSTALL WITH NOTHING ELSE
check your node version, you might need to install a newer one
@hidden gorge If this doesn't work then try deleting the node modules folder and running npm i again.
Any good host for github bot and website at the same time?
Node modules and package-json
Any VPS for a few euros will probably be enough
(free hosting)
I'm a customer Support Representative there.
Because if you can get the same thing in free then why waste money?
You are never gonna get "the same thing" for free
It's like having to spend on food. Food from the garbage or any other "free" food is still food and you could eat it because why spend money, but it is not the same as buying it in a store or in a restaurant
Hi, I'm trying to create a functionality in python within my discord bot that when someone votes for my bot sends an announcement to the server but I don't know how to do it
Funny enough it only supports a few languages/runtimes
Node, Deno, Python, Java and Lua (out of all things)
use the sdk and webhooks
I do not know how
following the docs
I did but it doesn't work
Show code and errors then
gives me this error:
Traceback (most recent call last):
File "c:\Users\lione\OneDrive\Desktop\TBS private bot\ttsbotprivate.py", line 1184, in <module>
topgg_webhook.run(5000)
File "C:\Users\lione\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\topgg\webhook.py", line 161, in run
return self.bot.loop.create_task(self._run(port))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\lione\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\discord\client.py", line 140, in getattr
raise AttributeError(msg)
AttributeError: loop attribute cannot be accessed in non-async contexts. Consider using either an asynchronous main function and passing it to asyncio.run or using asynchronous initialisation hooks such as Client.setup_hook
@sharp geyser
Well the error is kinda self explanatory
You are doing something that requires the use of async. Iirc discord.py has a few hooks that are asynchronous that can be used with the sdk
That’s something you’ll have to find in the docs yourself as I don’t use discord.py
for github?
Wdym GitHub
i have my bot's code on github and i want to host it 24/7
You’re supposed to be hosting a local copy
i have my code on my pc yeah using vscode
That makes no sense. Unless you want to periodically pull from GitHub to make sure it’s up to date but that’s excessive
Using the code on GitHub to host is not ideal
well then?
Use it on a vps.
Virtual private server. It’s a system that’s exposed over the web that you can ssh into and use as if it’s hardware you are physically using
You can put your bots code onto it and use something like pm2 or if it’s a Linux system which I recommend using you can use Linux screens to keep the process running
Personally, since I started the first Minecraft server, I only use screen, I found out about PM2 only when I started getting interested in bots on discord
Screens are nice
You have to buy one, or either use a free hosting.
But they aren’t foolproof and can get complicated if you aren’t careful
What irritates me the most is when my internet goes down for a moment with the screen open and after reopening the terminal I can't access it with screen -r <name/id> command 
Probably got detached
Use the ls command that screen has to see if it exists anymore
If it does use the ID it displayed if not remake the screen
I use the id over the name
It’s nice to have it named if you have multiple but the id I’ll always use no matter what
Yea, I have to close this screen with id and then redo it and close it properly with ctrl + a d` but actually this situation happens once a month so whatever. Redo is the most troublesome with the bot because of all the rate limits and so on
how are you not operating at a loss when you dont stop adblockers on the earn coins page
Let's just say, that's a secret.
😉
Why is this whole "free" hosting increasingly suspicious 
for real
selling data

generally when you are getting a service without purchasing a product, you ARE the product
Use -R
It forcibly detaches the current session and reattaches
You can use it as a drop-in replacement for lowercase, unless you have someone else working with u
Cuz it forcibly detaches whoever is connected
No, no, I do everything myself 
Then u can use it always
Thank you
Yw
No surely not
That can’t be 😭
Elon has evolved this concept. With Twitter premium you can pay while remaining the product 
?
@hallow nest #rules-and-info @torn locust
@harsh nova ^
@desert urchin
🍕/spoiler 🍑 message 🍕:🍕🍑Nookie (For the Nookie) [Neptunes Remix] by Limp Bizkit https://www.shazam.com/track/216726/nookie-for-the-nookie-neptunes-remix?referrer=sharehttps://discord.com/channels/1171696287909953556/1178450637751599165Login
Store
Community
Support
Change language
View desktop website
© Valve Corporation. All rights reserved. All trademarks are property of their respective owners in the US and other countries. #footer_privacy_policy | #footer_legal | #footer_ssa | #footer_refunds
Date Posted: Dec 9, 2022 @ 10:21am
Posts: 389
Start a New Discussion
Search this topic
Discussions Rules and Guidelines
More discussions
4
Не заблокируют мой акаунт?
0
World war z
3
Не заблокируют мой акаунт?
4
Не заблокируют мой акаунт?
STEAM
All Discussions > Steam Forums > Русскоязычный Форум > Topic Details
блэнк Dec 9, 2022 @ 10:21am
Музыка вечна. Куда же без неё?
Слушаем, пишем, обсуждаем и просто наслаждаемся :cleanseal:
<
1
Showing 1-15 of 389 comments
блэнк Dec 9, 2022 @ 10:22am
Last edited by блэнк; Feb 19 @ 8:55am
#1
блэнк Dec 9, 2022 @ 10:22am
YouTube™ Video: Mega Drive - Black Katana
Views: 57,760
Moving the dark stories from 198XAD and 199XAD forward "Black Katana" is an electronic synthwave instrumental piece that takes listeners even further into the dystopian future rife with...
#2
giimer Dec 9, 2022 @ 10:23am
YouTube™ Video: INTERSTELLAR - Beautiful Space Orchestral Music Mix | Epic Inspirational Sci-Fi Music
Views: 4,706,154
Follow Pandora Journeys Official Playlists ➝ Spotify (EPIC MUSIC): https://open.spotify.com/playlist/28rEK5OxVacTeR8OW1UaCw?si=hpVXr3bBRIW8KCqPjm4R8Q ➝ Spotify (Beautiful Orchestral):...
Last edited by giimer; Dec 9, 2022 @ 10:23am
#3
Xayc Dec 9, 2022 @ 10:25am
Кукла колдуна, одна из лучших песен Короля и Шута:
YouTube™ Video: «Король и Шут» - «Кукла Колдуна» HD
Views: 56,761,252
Музыкальная композиция группы "Король и Шут" - "Кукла Колдуна" Использованы кадры их фильма - "Van Helsing" Премастеринг выполнен в среде - adobe premiere pro...
#4
gk4stalker Dec 9, 2022 @ 10:45am
Написать могут все, а понять о чём говорит нет:steamthumbsup:
- каким-то чудом музыка проникает в самую душу
YouTube™ Video: Сталкер. Монолог о музыке...
Views: 71,490
Видеомикс на монолог...
Originally posted by блэнк:
Слушаем, пишем, обсуждаем и просто наслаждаемся
YouTube™ Video: Сима Чернышёва. Перевал
Views: 7,730,099
исполняет Сима Чернышёва
источник высокого наслаждения!
YouTube™ Video: Deform "Зарази меня жизнью"
Views: 137,600
Когда мы слушаем великолепную песню, хочется "увидеть". Иногда группы не выпускают клипы. Тогда я даю возможность моему воображению.
YouTube™ Video: Deform - В ожидании весны (HD)
Views: 48,344
Клип группы Defirm в HD
YouTube™ Video: Наутилус Помпилиус - Зверь
Views: 23,079,663
Last edited by gk4stalker; Dec 19, 2022 @ 3:04am
#5
János Újváry Dec 9, 2022 @ 11:12am
YouTube™ Video: BABOOSHKA - "Вата" (официальное видео)
Views: 109,467
альбом "Православный аватар" (2019г.) сценарий, режиссура, монтаж, постпродакшн - Моргана, оператор - Red Raven.
Думаю, вам понравится
#6
Sturisoma Dec 9, 2022 @ 1:15pm
YouTube™ Video: Ivan Mládek - Jožin z bažin - Subtítulos en español, English subtitles, Napisy polskie,české titulky
Views: 9,578,909
Ivan Mládek - Jožin z bažin - Subtítulos en español, English subtitles, Napisy polskie, české titulky, русские субтитры, Jorge Bagre
#7
Iridium.White Dec 10, 2022 @ 5:34am
YouTube™ Video: Jesus Christ Superstar (1973) - Heaven on Their Minds Scene (1/10) | Movieclips
Views: 927,727
Jesus Christ Superstar - Heaven on Their Minds: Judas (Carl Anderson) tries to warn Jesus (Ted Neeley). BUY THE MOVIE:...
YouTube™ Video: LORD OF THE LOST - Priest (Official Video) | Napalm RecordsScatman Joh
rekT@p!4e? Dec 10, 2022 @ 9:17am
Iridium@jolly zephyr
YouTube™ Video: (세로룩북) 간접비행 슬랜더 Nicholas
@tall goblet lets not
-m 1171694730963320853 spamming some weird stuff
trickg99#0 was successfully muted
I'll decide duration tomorrow I'm too tired
alr
Is there a way to get every command Id, discord. Py
I tried to hash the name but idk if that's the ID or not
@spark flint lets not
lol

@warm surge
yes?
function name()
{
}``` or ```js
function name() {
}```
I prefer the latter more
when a c# dev codes js for the first time
One True Brace Style
people who use the first one are ugly
this
I just use whatever is the most accepted for the language
for c#, it's the first one
Tho I use none if that's an option
C# first one everything else second one
yeah just js () => console.log("bollocks")
I meant for if statements
some require brackets iirc
or react
@surreal sage
uhm
..?
@surreal sage
@solemn latch ^
@main arrow please stop pinging people for no reason
Is there a way to allow tokens to a development version of a bot? Or is the only solution creating a new page for the development version of the bot?
For context, I have 2 bots with different IDs, one for production and one for development, I would like to test some features on my development bot before releasing it to prod
you could either have two copies of the bot or use environment variables and have an if statement checking what the environment is and use the appropriate token
for example on your pc have the environment variable be set to development, on a vps have it set to prod
then do a simple ternary operator to check the env and use the token you have in your config file
yeah that's what I have right now, so the solution for testing is to create a new bot page for the dev bot in top.gg?
so like client.login(env === 'dev' ? devToken : prodToken)
No, only put prod bot on top.gg
dev bot stays with you
just make a new bot for development
yeah i have a bot for development, my problem is I'm using the TopGG token from my prod bot to test on my dev bot and it's getting a forbidden error
I'm assuming it's because the ID of my Dev bot is not the same with my Prod bot and when it's being checked, the ID's do not match from what TopGG has (which is the Prod Bot ID)
oh if its something like that then a mod or someone more experienced with the top.gg api will have to answer
I thought you were talking about the bots from a discord perspective
yeah I got this part already, thanks tho!
hey guys
i really need some help with my website
i use vh and vw everywhere
but idk, is that the norm? I see a lot of people use px instead and i don't know which to use.
i know px is just an absolute while vh/vw are relatives to the viewport but idk...
i mean if it works there should be nothing wrong about it
cc @civic scroll
there are two types of dimension units: fixed units and reactive units
vw / vh are reactive units, refer to percentage of browser viewport width / height (the area in the browser of which used to display your website)
px is fixed unit (pixels)
use fixed unit when you want the element to have... well, fixed size
and reactive units when you want the element to change its size according to something else
note: for reactive units other than viewports, pay attention to which element it bases its dimensions from (cascade hiearchy really matters)
tip: besides px you have pt, cm, ... for absolute length (https://drafts.csswg.org/css-values/#absolute-lengths)
you also have rem, ch, etc. for reactive length (https://drafts.csswg.org/css-values/#relative-lengths)
extra!
deg, turn, rad, grad for absolute angle (https://drafts.csswg.org/css-values/#angles)
s, ms for time (https://drafts.csswg.org/css-values/#time)
and even frequency! (https://drafts.csswg.org/css-values/#frequency)

i needed this too thanks sis

you won't go further than px / rem anyway
but it's good to know what you have at your disposal
what does rem stand for
root element's em
root element's font size
html
ooo
that's the only root i could think of
since you can set rules there and they would cascade
damn
people starting out don't know why their css looks wonky
they forgot the "cascade" part
they are gonne learn the hard way 
using reactive length?
i mean pretty much every newbie frontend dev will only use px 
especially %
i mean they will soon find out that it doesn't scale 
just throw @media at smaller screens and hope everything works 
and then complain how css is hell
theoretically, everything works if you use it right
if it doesn't, time to submit a pr to css draft
and to renew your domains
cc @civic scroll
hi there sayu
i'm too busy
hi kuu
i tried hadoop
it was pain
needed to ask you a thing for a friend
do you do freelancing jobs?
you planning to hire her? 👀
cc @craggy pine
smh why did you unfriend me
I didnt 😢
😔
i'm still processing the shock of being a sysadmin and now a full stack developer
lmao that's like full and a half stack
goddamn where did you get frs from
sysadmin?
actually not just servers
idk, most people there I don't know
i set up a mongodb cluster, a hadoop cluster in distributed vm configuration
likely because I have an admin role in a big server
you should only accept frs from friends of friends
for what
what is hadoop again?
apache hadoop - distributed data processing
ah
have you done cookies before?
i had cookies set via headers but for some reasons my browser doesn't set it
Express#app.Response#cookies
oh wait i should explain to you
my configuration is one backend, one forwarder server and finally the frontend
all 3 are of different origins
Backend <------------> Forwarder <----------------> Frontend
localhost:3001 localhost:3004 localhost:3000
i've never done it through headers
"why this?"
i had to do this configuration because my classmates were testing the api via a cloudflare tunnel
if the backend shuts down, so does the tunnel
so i set a forwarder and have the tunnel connects from here
the forwarder only modifies origin header, but keep the rest intact
how did you set it?
well, it was for in-site preferences, so through document.cookie
you could grab the header and document.cookie = headers['Set-Cookie'] if all else fails tho
oh, wait
ah nvm, "except on localhost"
well, according to the docs there's nothing wrong with your image
i could see it 
cant even export my photopea thing 😭

💔
Download some ram then




