#development
1 messages · Page 211 of 1
once you get to a certain size free hosts just dont cut it
I run too many apps/bots so i went for an EC2 on Amazon.
I can run my bot on the free tier of Heroku
i have four bots, i have two dedicated servers at OVH, two bots on each
at 10k guilds
i wouldnt trust any free host with my bots that have premium
theyre too much of a hacker target, if youre taking money
host off an rpi
if you really want to do that make sure:
- you get an nvme hat, DONT USE AN SD CARD
- ensure your internet is up to snuff
- make SURE you have a UPS
people dont like slow bots that constantly go offline
It's a free private host that my friend runs
I have a number of bots for private use
No UPS sadly. I want one
gigabit internet though
Also my friends host has limited server slots and has protection also my bot can't really get attacked
if it connects to WAN, it can get attacked
very safe
you can get special ups for pi that can last literally days
because their wattage is so low
I have similar for my router which is similar wattage to a pi, it puts 12v straight out the back for the router doesn't have to step it up to 240
with a bot your reliability is more important than the raw speed. for most domestic internet, if it goes down they "endevour to get it back up asap" that could be days
for proper business connections they have to get it back up in 6h-12h or pay a penalty, no matter if its xmas day even
they dont just give you money off next bill if they fail to deliver, its a serious contract and they pay you hundreds, direct
which would cover the pissed off users not able to use the bot
but i dont have internet like that, as i dont host at home
instead youre at the mercy of the host provider
a lot of these cheaper providers (as in have an established name, but more on the budget side) dont guarantee 99% availability
tend to have outages that last from a few minutes to a few hours
and no compensation as outlined by their eula
so they have no incentive to avoid these downtimes for customers
you get what you pay for
How do I add images to my description like how PokeMeow has?
<img src="image_url_here">
ez
Thank you!
So html
yessir
i wanna test out how well top.gg sanitises the html but submitting a bot takes time
what do you thinking of testing?
Hey i need a help my bot declined with the reason of unmodified instance of resist
But i swear i didn’t copied resist
I suggest you to dm the reviewer
Thanks i will dm him
I accidentally changed the slash commands of my bot, how do i return that shit back on
(i ran the bot token on a folder that had different slash commands, now the slash commands of the bot are completely overriden)
It probably depends on how you register your commands
I simply replaced the old commands with an array of new ones, if you can call it that
There is an article on the discord doc to delete all and rebuild all commands (/)
delete all, then this
i once met a 'typescript' dev who puts all types as any and throws @ts-ignore wherever he could
omg
to have typescript in your CV
and twitter bio
is bun copium?
i use a language/technology once and add it to my cv
helps when it comes to getting past automated checks or clueless HR people
in reality any competent programmer would be more than happy to learn a technology theyve never used for a job
adds 5372 different languages, frameworks, systems, stacks, techs to his CV
"rejected for being overqualified"
HR: "name all those 5372 languages without looking your CV/internet"
we're gonna be here a while
there is no winning
and 80% of junior/entry level jobs want you to have relevant professional experience
thats not really a junior then
they just dont want to pay you for what youre worth
so they gaslight you into thinking youre a junior
Confidence does a lot to get through the door initially then they will see your results in the 3 first months. Sitting down and saying "i'm the guy" is weirdly enough sufficient
and then after 3 months if they tell you you're bad then it's a good reality check to go learn more stuff xD
Setting up webhook to support voting on Top.gg. Anybody know why it's pinging every 10 seconds? It should only hit when a new vote is received, but instead it's doing this.
Well show the code of the webhook.
you need to send a 200 response code
Right
Top.gg can also send retries if a certain amount of time has passed, even if the request hasnt timed out.
Is it about 10 seconds between? That would explain it
https://docs.top.gg/docs/Resources/webhooks#timeouts
Top.gg says 5 seconds to send a response, but I've found it to be less.
Webhook integration for receiving vote data
Thanks, I'll play around with this
you can also use a webhook tester like postman to manually send yourself a vote and check if your code is properly handling it and returning status 200
Yeah
lol
hey guys, i had a question about parallel processing
i did some benchmarking yesterday and found out that my program ran terribly at 2 cores, i sped it up to 16 and it literally gained like 10x the gflops of the original sequential program, however when i selected 32 cores it actually decreased to only 7x the og gflops.
How the fuck is this possible?
I have enough cores on the server to handle the job.
uh ok, how did you "run" using 2/16/32 cores?
i used my school's server
O.O
not the question
your question has too much ambiguity
HOW did you make it run on 2/16/32 cores?
like, code
openMPI
the hell is that
💀
"Open Source High Performance Computing"
allows a way to section parts of codes, run in parallel, gather all data to the main source, it's really fucking great.
got even more confused, but anyway
same
what language are we talking about?
c
ew
ok so, there's a thing about parallel processing, which is that you cannot use whatever many cores you want, you're constrained to threads
unless you're using asm ofc
the OS itself handles the core usage
open MPI automatically creates new processes on the amount of cores you have
that's likely threads still
hmm it may
the thread count is usually double the amount of physical threads
that's strange though
because open mpi literally has a variable that lets you know how much cores you want to use
i got a quick lecture about it, and it was expained that open mpi claims the resources so, such that each single process receives its own core if feasible in the environment
if that was true, setting it to 8 cores would deadlock your pc
why?
a cpu only has so many cores
o.0
afaik only the OS has direct control on them
but anyway, lets go back a little, why are u using it?
Model: AMD EPYC 32-Core Processor
CPU Architecture: x86_64
CPU Cores: 32 (16 cores per socket, 2 sockets)
CPU Threads: 32 (1 thread per core)
amd epyc nice
i am computing the mandelbrot set
can you show me your server?
the sequential version is wack, and i want to make it parallel.
why cant you multithread from the code?
it's my school's, i only have access to the GUI
ah
because there are special libraries that can handle it better than just threads, such as open mpi.
Open mpi gives you a more structured and efficient way of execution, as well as sectioning off parts of code.
MPI_Init(&argc, &argv);
int rank, size;
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &size);
each process gets its own number, a rank.
The amount of processes running is the size.
it allows you to do cool stuff like:
if(rank == 0) mandelbrot(m, n, x1, x2, y1, y2, max_iter, picture, start_index_of_row, total_rows_to_process);
gettimeofday(&own_tv2, NULL);
MPI_Gather(picture, total_rows_to_process * n, MPI_INT, all_picture, total_rows_to_process * n, MPI_INT, 0, MPI_COMM_WORLD);```
well, I'm unsure anyone here will be able to answer your question then
not even once have I heard abt that lib
never heard of it
Why am i learning all types of fucking bs that apparently no one uses
that's a good question
fr, especially big data course got me tweaking
talking about hadoop, map reduce, apache spark
for multithreading I'd just do it myself, if the task is clearly defined it's pretty easy to handle synchronization of data
get the fuck outta here
i see
yeah idk, the lib was pretty nice to use. Iirc, openmpi is also configured to be more efficient though and it allows processes to communicate with each other over a pipeline which is sick
kuu, what are you majoring in?
Or are you finito with school
I have bachelor degree on SDA, wanted to do some robotics but nothing available nearby
what's sda?
system development & analysis
ah i see, damn that's sick!
you should definitely pursue robotics, but its fucking hard
One message removed from a suspended account.
One message removed from a suspended account.
open MP is another parallel computing lib but it's shit imo
too much fiddling around with sectioning off codes, i rather have MPI which allows you to be flexible in the scoping.
@lyric mountain you were right
The OS on the server can actually limit the amount of cores you can use if you claim too much for one specific job. Not only that, but this combined with the fact that each process has an overhead in startup will only drag the speed down even more.
zamn lemme take this into my analysis, arigato.
Yeah, OSses are pretty conservative with core usage
Else anyone would be able to bring the system to a crawl, or even hold it hostage
Try to limit yourself to about half the available cores
I see, thanks for the help! I can always rely on you 🤞🏽🤞🏽
usually the operating system tries to distribute your threads evenly amongst all cores
but operating systems don't actually try to stop programs from computing too much
it might appear that way since one job of scheduling algorithms is to minimise starvation of other threads but a single process can still overwhelm a system
its because its not usually a big deal if a single process can hog the entire system, the user might get annoyed slightly sure but theyll end up removing the app or doing something else like lowering priority
and sometimes you might want that to happen anyways
I just had a server have an issue where any commands that deferred an interaction, it was stuck on deferring, all other commands that didn't defer were fine.
Anyone else encounter this kind of issue? It's my first time.
in chitty's case it was an OS issue in fact
whatever he's using is trying to use the actual cores
@ivory siren here too ^
Is topgg down?
Hi, I'm here because I got something wrong about Discord bot verification.
My bot reached 100 servers and required to get Discord bot verification, but they wanted privileged intents to get verified first.
So I submitted a request (two attempts) and received "Unfortunately, I am denying your [some intents] Privileged Intent request"
I asked about "privileged intents verification" to dev community, and most developers said privileged intents are difficult to get verified.
Whereupon, any developers who have experience or tips on here, I want to ask about it.
((sry for poor eng
its not supposed to be difficult to get privileged intents
discord just wants you to have a legitimate reason for wanting them
theyll grant you them if you have a legitimate feature that needs those intents and cant go without them
if they rejected you that means your use case can probably go without needing those intents, or you sent them a poor explanation as to why you need them
they should provide detail as to why they rejected you though
When i got first rejection, I added Word Chain mini game
For example, message content is required to play the Word Chain game. so I requested "Message Content Intent"
Isn’t message content the only way to optimize time, response speed, and accessibility?
We don't want to use the slash command when submitting words lol
But got same rejection so...
As Robert said, with the introduction to slash commands, the message content intent has become rarely needed. Which is one of the reasons it is it's own privileged intent (not to mention its expensive).
Slash commands are more convenient anyway
It sounds like you're adding features to get the intent, which is kind of backwards.
Intents are not goals, tbh you want to have as few intents as possible.
yup
More intents you have, more data being sent to your bot
Which in turn means more memory usage
especially in discord.js case as it literally caches everything
😔
Thankfully you can set your cache for specific things now
When did djs allow such freedom
13? I don't remember
Ok i'll try without any intents
like mind of "Intents are not a goal"
thanks everyone
message content is a 180-turn from what you described
slash commands are to optimize time, response speed and accessibility
message content is for things you'd not be able to achieve with slashes
the 3 priv intents if anything will add A LOT, wait, lemme put more emphasis on this
A LOT
of bandwidth consumption to your bot
For features which require sending messages on bot start-up, how are people overcoming the "too many messages at once" problem?
Or is that just solved when bot is verified for 100+ servers?
Not necessarily
well I simply don't
- You should never need to do this
- You can't solve this with your bot
you might post on your own server in an announcements channel, then have interested mods follow that channel
let discord broadcast the message
I'll use something like Truth or Dare as an example -- sends a message with a prompt and has buttons to request new prompt. When bot restarts the button's interactions become invalidated. Wouldn't you need to send a new message when the bot starts up in order to have new, valid interactions?
It's an endless game with no start and no end. Idk if you've ever used the TorD bot
well, you can resume the game by storing the game state on a database
yea
simply re-attach the button listeners at boot
I am confused on how you are hitting this rate limit
Yeah it's just running on a cache so might not always be 100% up to date. Maybe best thing to do it just loop through recent messages in the channel until finding last prompt and refresh buttons?
Then there is no way to do it
dump the cache to a file
load the file on start
just make sure to also store the message id so u can fetch it
Will try this
my favourite junior roles
junior at this point is just a keyword for "we want a senior but we want to pay you like a junior"
on linkedin that tag has absolutely no meaning
pretty sure they just select all tags at this point
yep
I saw a position for a software engineer that required 8 years of experience
it was labled as a junior position
I’m confused on the phrase “working help command” anyone have an example what this is supposed to look like?
And obvious point of entry remarks
Well, the best help command is one that will explain to the user what your bot does and/or give him a list of commands that will allow him to set the bot to do what it is supposed to do
You, as a developer, know what your bot does, but a 13-year-old who is just discovering Discord won't understand everything at once, so you need to help them a little 
it should be obvious what i can do with your bot right away
by either running a help command
or mentioning the bot
or a message popping up on join
etc
I see
I love senor entry level roles!!! yippie
Want to work for my company then?
Its a junior level position
but you need 20 years of experience in fortran
Probably amout the time it'd take me to understand fortran
jokes on you I alr have that
and need to provide 4 references with phone numbers upfront
jk. I can read assembly. It doesnt get worse than that. Except binary I guess but lord forbid
Also a personal connection with Steve Jobs
Must have connections in the industry
Me and Einstein were tight 💪
with a connection of that level, I can give you an internship at best
honestly it feels like some job listings are meant to be bad so the company can just go "see? We tried to look for an outside hire" just so they can employ the CEOs son or something
Oh for sure
Why hire outside if you can hire the descendants of the executives
They are already rich
Just pay them slightly more and they will be happy
i read somewhere that a big number of job listings are fake exactly due to that
they already have the person for the job, but they are required to post the listing for X amount of time anyway
and they just reject everyone regardless
Or companies look better to investors with more fake jobs and more applicants
read something where listings are posted only to acquire data they can later sell to data vendors
I love big data. Big data is our friend
💀
oh ive seen exactly that
they found the person but they keep promoting the job on job boards anyways
quite disrespectful of peoples times
thats why people shouldnt be so pressed about people selling your data and it being widely available
unfortunate truth is it happens all the time
thats something that simply doesnt exist anymore
nobody respects people's time, anywhere
people are expected to waste their time and be thankful for the time they are given, if any at all
its a horribly one-sided relationship
this really annoys me when it comes to references
some companies think its fine to request references before an offer or any serious commitment
i will not allow you to annoy my references for a "potential" job
im already thankful theyre happy to do this for free as it is and i dont need them annoyed
or their privacy given up
hey cuties
.... are you sure?
does anyone know where this Top Page is? i cant seem to find it. it should have my bot on there but i can only see my bot on the other page i won
Do you know the horrors between analyzing and processing big data....
Or furthermore, the hassle of working with apache spark and distributed file systems, or fucking acient systems like hadoop map reduce... 😭
big data ain't your friend, big data is your enemy
true, i still have no idea what those job titles actually do in practice
at least in some parts of the world theyre legally required to post job vacancies publically, they cant just hire internally
i mean they can hire internally but only after letting others try, even if theyve already decided and will reject all external applicants
they cant admit to that
Hello, i have a question. Which of the two should I do first?
Or does it not matter?
You should be doing both at the same time
If your bot requires privileged intents then you need to include the reason for them along with your application (at least that’s how it was for me)
It’s part of the verification process
thanks
The bot authentication form says "FOR HOW LONG DO YOU STORE IT?" I have a question regarding this question.
I wrote that the data would be stored until the user directly requests deletion, but the response I received was "I have decided to deny your verification request. This is due to the duration in which you retain discord data."
Does the application have a maximum storage period for data? What am I doing wrong?
You have 2 options. Big data analyst or big data engineer. A the analyst, you use certain analysis programs that allow you to work with a distributed file system, with other words : data is stored at different machines, you write analysis programs. Each machine runs it on their own data, eventually we are adding the results together. As the engineer however, you are more concerned about how to store the big data. Big data usually refers to data that is too big to be stored on one machine. Hence we usually create multiple servers in a server rack, connect them using rack switches, and then connect those racks to other using cluster switches to create an internal network. Especially when using hdfs, the Hadoop distributed file system. One server becomes the name node, the boss of all while the rest remain workers. I cut a lot of corners here but it’s just for an overview of what working with big data really means
For working with big data and analysis we usually also tend to use programs like mapreduce or Apache spark.
The internal structure is actually sick: in mapreduce your client communicates with the name node and pushes a certain job to the manager. The name node will then start all the mappers where the data already is! So suppose w have 19 files over the cluster we want to do analysis on, then the name node will start 19 mappers. It takes as input a row and output key value pairs. We then go to eventual combiners. Or in mapper combiners and then move on to the partitioner and shuffler/sorter that sorts by key. Then we reduce all the values in reducers, ensuring that all keys go to the same reducer by hashmapping in the partitioner
Apache spark however works different, there we likely work with RDDs or with data frames. RDDs are simple they contain lineage: “what partitions do I have. How am I computed?”. The data frames is just that we align data from various sources and parse it into actual sql data to work with. In Apache spark, all code is sent to a logical planner, making ast trees. It then moves on to the physical planner turning it into byte code. Based on that we create rdds and send it over to the dagscheduler, creating a dag schedule from the rdd parent list and splitting it into various stages. It’s then executed in each machine
So in Apache spark we execute all commands in one machine while mapreduce rather does one step at one machine at the time. Then it sends it over the network to another machine to do the next
I find this pretty interesting hence why I yapped so fucking much
who are you even talking to
It probably depends on what exactly the data is, because from what I remember, there is a question about what data you store in your bot and if you wrote there that you store the message content and then wrote that you may store it forever, Discord may not like it
the amount of bots that lie about these data storage policies is definitely a lot lol
seems google is trying to tell us something
"what, we have to delete it?!"

nah
uhh
just say you periodically remove data that hasnt been interacted with within 30-90 days
pick one
i just scared to discord dev teams
wether you do or not... they arent going to read your source code
i put on mine that players who havent interacted with the bot in 30 days may have their accounts purged to comply with data retention policy as per the privacy policy
in practice i dont atm, because people get really upset if i delete their character because they took a break
or imagine if i nuked their trivia score that took them years to get
honestly just say you'll delete them after x days and whether you do that later is up to you to implement
worst thing discord can probably do to you is unverify your bot
*IF they find out
which they probably won't unless you very obviously retain data
anyway.. thanks everyone
when i verified, i told them the data is stored for 1 year
they approved it lol
but from what i heard, today they are more strict, you have to say you delete everything after 30-90 days, otherwise they wont let you verify
Bruh
I store information indefinitely 😏
I sell it to big data
even if the only actual data you store is the ID?
for some reason yeah
i havent experienced it myself, but i've seen people failing to verify because they dont delete ids
Why are they so strict on it
like goddamn
Now I want to make a bot and get it verified asap 💀
lmao
Test the limits of their data deletion policy
its like
It's kind of dumb they will deny you for storing ids past 90 days
they act like per-server bot settings is the norm
and dont think about the possibility of cross-server settings
so they expect devs to delete everything when the user leaves a server
I used to delete user-guild profiles before when users left the guild
I can say, they were pissed when their level reset to 1
I would understand if the user shares no servers with the bot
but if there is still servers it shares it with why delete it
i made a mass deletion once, mainly targeted deleted discord accounts and users who did not interact with the bot for over 1 year
did a backup before just in case
and i did get many people asking for the data to be restored
How do you track deleted accounts
because they created new accounts but were still using the content from the deleted accounts
because people can make their account look deleted
did a GET user for every single one
This is why I said it was virtually impossible to track deleted accounts
imagine if top.gg had to do that
💀
imagine if discord deleted accounts older than 90 days
ik people who went missing for like half a year then come back normally
imagine companies taking the same restrictions they force on users and applying it to themselves
I went MIA for an entire year
How do I update my bot's pfp on top.gg
Because it's been 2-3 days since I changed it and it hasn't been updated on top.gg
click refresh data on your top.gg bot page, then click edit, change something (like adding a dot in the description or smth) then click save
Thanks
👍
wait until they find out that when you delete something it likely doesnt actually get deleted and remains on the hard drive until its overwritten
most databases dont delete the records but mark them as not in use
so they eventually get overwritten
because you cant really delete or add things in the middle of files
they might be worried about GDPR implications
thats likely been caught in the crossfire then
actually if you think about it basically everything on discord is public information
think its difficult for them to gauge what to delete and what not to delete
i will consult with my lawyer (chatgpt)
chatgpt the best lawyer
but yes discord bots are also under the implications of GDPR
they count as the data processors with data being made available by the data controller (discord)
otherwise it would be a loophole in GDPR if bots can store data that discord cant
Well I will store data for as long as its needed
GDPR can come catch these hands if they have a problem
you don't want to mess with GDPR
If I dont serve any EU people who cares
😏
I ban all EU people from using my bot
they are required to tell me their country before they can use it
ok so your bot knows when someone is european or not when they use the bot?
now it makes a lot of sense why discord wants you to verify your identity when growing a bot past 100 servers
because if the bot breaches GDPR the bot owner becomes responsible as the data processors
otherwise it would fall over to discord being responsible
Bah I will just ask chatgpt to write that up for me
🤣
the second you monitor the behavior of individuals in the EU, you have to account for GDPR
whether they can access your bot or not
but to answer your question user IDs do count as personal information in accordance to GDPR
because they can be used to identify a user/specific resources by that user
I mean yea
so they also fall under the right to be forgotten doctrine
but the fact they require you to only store it for 3 months at most is kinda wack
as long as it's identifiable it counts
welcome to the real world
?
privacy laws are wack
that's a design issue
Not really
yes really, there are so many workarounds
also an ID cannot be used to identify a specific user UNLESS you share a server with them

not true, you can look them up
in which case you'd have the ID anyway
you cant
No you cannot
you need the IDENTIFY scope to fetch user detail, which requires explicit permission (oauth2)
OR if you share a server with them, you can fetch the public data
and if you are using the bot api, you HAVE to have the bot sharing a server with them
it's identifiable whether you want it to be or not
no...its not
how do you identify an user by their id?
right
^
as i said, in that case you already have the info
doesn't need to share a server
ok that was unexpected
What even is that from
user ids are identifiable whether you like it or not
discord's api

no idea, this account is only in 1 specific server
doesn't matter whether you have to "get it first" or not
Cause if the user has signed in through oauth or invited the bot then ofc its possible to get the user information
obviously, but the point is, user ids can be used to identify someone on the platform
that's more than enough
sure, it's silly, but that's how it works
I really have no idea how you can get someone's info without sharing a server or oauth2
no, lol
that account only joined my support server for testing purposes
discord can store your information as long as it's within scope for the platform
all users can be fetched, it doesnt matter if you share servers or not
done that many times
That's wack
At the beginning I also thought that it was a matter of sharing the server because this bot is quite large, so the probability that you share the server with it is also high
That should not be a thing
there are no restrictions whatsoever for GET /users/id:
^
that's wack
it is what it is
ye
so I suppose I could just hash the user id then, this would remove any identifiable data from the database
the intent is exactly not having an expiry
I think expiring data that is essential with such a low store time is kind of bogus.
How do these game bots and mod bots function?
cuz turns out people get mad when they go AWOL and come back to find all their data missing
not even that
you have to account for GDPR regardless according to discord bot dev terms
yes, but i'm not talking about Discord specifically
Without limiting Section 4, you will comply with all applicable privacy laws and regulations, including the European Union’s General Data Protection Regulation (GDPR) and the ePrivacy Directive, the UK General Data Protection Regulation, Brazil’s Lei Geral de Proteção de Dados (LGPD), the California Consumer Privacy Act (CCPA), and the California Privacy Rights Act (CPRA).
ah ok
Discord collects data on EU users, so that's a given
why are california laws separate from US laws
because they can, i guess 🤣
california has its own laws against privacy
the US is wack
I mean a vast majority have the same laws
but states get the freedom to make their own laws so long as it doesnt override federal laws
Its even scarrier once you get into reservation lands

Reservations have their own laws as well
US did the europe thing before it was cool
if you murder someone on tribal land then they have the final say on what happens
state can't intervene

the kurwa dude is taking notes

I rarely use this word 
i love the word
I feel like I know more about american history than most americans
At least if any of the yt videos has to shwo for it
then I definitely do
💀
most americans dont know anything tbh
lmao
I used to be good at geography
ask random americans to show where north korea is in the world map
I even saw a matching meme recently
Its like 30px
Bro 😭
LMAO
yknow
its rumored the first president was actually an African American
before president was even a position
How true that is, no idea
I've not really seen any evidence backing it up
I love Getty Images
looks like it
nah that is denmark bro trust
what do the colors have to do with it
they mark the borders
ok
making it easier to figure out
not really
anyone who doesnt know shit about geography (most americans) would claim that japan is korea
💀
i've seen worse
why are we discussing this in dev chat
We are talking about the development of countries
Wait a sec 
so proud o them
one was close enough
its scary that a lot of people think Sweden is North Korea
we are north korea
at least a lot more got closer
ofc people 65 and up would know
they took part in the korean war
💀
if they didn't then that would be scary
L bozo
(I sometimes gotta do actual moderation so I dont get demoted)
this is my general
I will sent you to general 4 (rules only role) if you dont watch out
he can only talk to people here
yeah tim has an excuse. This is Tims land
:^)
this tho
we all know they live in the water
Can I set the bot status to offline in discord
Such a useless thing

maybe like paypal bot
something that's supposed to work in the background, who knows
¯_(ツ)_/¯
I know
I just dont understand why discord allows it
it makes no sense
not taking it out on ya
Hello everyone, I want to write a bot for Discord. I know I need to learn JavaScript, but I don't know what I need to learn for the backend and db. Can you help me?
Good place to start
it will teach you the basics of js and then some
Next thing to learn would be how to use nodejs as its a runtime for javascript and what you will need to make a discord bot
Ai có thể tìm hộ tôi con bot tự động đổi tên người dùng khi chọn role được không
will this dipaly it below it ?
👀 we have that stuff blocked on purpose
will this dipaly it below it ?
@KuuHaKu
Click to see attachment
it'll display where you put it
with the ! or nah
well yes, but could check if msg starts/ends with `
You need the !
k
Otherwise it’s a normal hyperlink
how to add bold example?
if u dont put the ! it becomes a masked url
like u just did
someone get the regex ^-^
Same way you just did
calm
Discord supports most of the markdown you’re trying to use and top.gg does as well
So it will translate over
why are yall getting flagged
dangerous
youre all banned
Cause the regex is too broad
just dont embed links stinkies
we should change the regex though. Whoever sends the fixed regex gets a gift(its nothing, but still its the thought that counts)
😔
Love internet is down
you stink
This is probably against those scams that mask links under fake Steam gifts links
well yeah, but it's capturing any masked url somehow
Yeah, discords regex is funky
This wasnt working in discord for me and I got distracted
oh well that would be okay
On the one hand, it's strange, but on the other hand, it's a bit of future protection if next time instead of Steam they choose another platform to mask scam links 
I thought single ` only was for one liners
I feel like that changed at some point
judging by the clipped endings, I'd say this is a side-effect of spaghetti code

Hello, does anyone knows how can i make this stroke this is the code for drawing a menu item (this is a radialmenu)
stroke u mean the border?
well u can just draw a circle
like, without filling
no need to calculate pie or anything
the rest of the circle is out of the view anyway
also i just want the border to appear when i hover the item
ah
well, did u draw the lighter bg behind the car already?
yes
just changed the fill color
then use the same code again, but do not fill
what property do i need to use?
a game
not set "fill"
use borderWidth (or whatever it's called there) to set how thick it is
if i use the stroke property it highlights the entire item (ignore the bug on the left)
i already tried this but i also tried stroke dasharray
idk how to work with that
can you please explain me how? i suck at svgs
yeah i tried but didn't know how that property works too 😂
it works like this basically
stroke-dasharray="n n n n n"
for each n is the length of either stroke or no-stroke
repeating
for example "5px 5px" would be 5px stroke, 5px no stroke, repeat
"3px 5px 1px" would be 3px stroke, 5px no stroke, 1px stroke, 3px no stroke, etc...
but where the stroke begins? how can i control the side where it appears?
you can also use percentages and em and other metrics
thats the problem, its troublesome because you have to calcyulate the starting point and measure the perimeter
for a path, it starts at the initial M point
for other objects i think you can define an origin point
try something like "33% 33% 33%"
and see what that produces
then adjust the values and see how they change
i tried 33%
hmm, i dont really know what the percentage is based on
im guessing its not the perimeter
there is also a stroke-dashoffset
this is strokeDasharray: '15% 50% 60% 50%'
that you can use to offset the starting point
try "0% 50% 50% 50%"
although this is basically going at it blindly, not an exact calculation
yeah i know 😂 but it works thats what i need
xD
idk why this is happening if you have any idea.. like it cuts the stroke
for some reason
If a <percentage> is used, the value represents a percentage of the current viewport (see Units).
... The percentage is calculated as the specified percentage of sqrt((actual-width)**2 + (actual-height)**2))/sqrt(2).
im guessing the percentage is based on the size of the image lol
so it could have issues if you change resolution/scaling
the stroke is going out of bounds
i will see..
i dont think there is a way to set inner-stroke
so you will need to either increase the size of the image a bit, or reduce the position of the stroke
ok
ie if the stroke is 2px, make the arc 1px less radius
thank you, also thank you @lyric mountain
you can also do clip/mask shenanigans
idk if i can
i use this formula to rotate the menu items
i have a strange concept for a game i’d like to code
it’s a “confessions game”
long story short, have players join a lobby, game starts, bot creates a channels in a category for each individual player to type in things they want to share, bot records the messages then it then deletes the channels, call players back to the channel where the original interaction happened, posts the recorded messages in an embed without the author and players must guess who wrote what by @ mention. first player to 5 guesses first wins
my question is, can i have the bot store the messages in an array instead of setting up a database?
sure, if you dont mind losing everything when you shutdown the bot
yes the messages will essentially be erased after each game anyways
databases aren't mandatory, you just need it if you want to persist data
ok that’s what i was thinking
so i’m a little stuck
and the code i have for it so far is kind of long
2 issues that I did notice already
okay, what’re you thinking?
1 - you cannot stop players from cheating (they can multi-tab into others' channels, unless you have manage roles perm to block everyone but the specific player)
2 - it'll be VERY hard to check for correct guesses
oh and
yes i have the bot create the channel for each individual player, so only the player and admin can see the channel
3 - player count will be limited by the ratelimit (which is fairly low for channel creation/delete)
unless you use threads
but then point 1 will be the major issue
also, i was thinking about that for checking answers.. i hadn’t gotten that far yet. i have the messages and the author by discord ID stored in the array
as you cannot have per-thread permissions
ahhh ok i see
at least I think you cant
yes but you'll rely on exact same wording
unless you use either a language model (aka AI) or fuzzy matching (which is faaaairly hard to get working on full sentences)
i was thinking the players would have to actually @ mention who they think wrote it
and the bot could match the ID of the mentions to the ID of the message in the array
i’ve never tried anything like this and i’m fairly new to this so i’m just asking if it’s possible
i ran a test with what i have so far and it create/deleted 3 with no issues
each server with like 10 players
Yes
ultimately things that rely on channel creation are heavily gated by how fast discord allows you to do it

i’m only doing this for my server
i should have led with that
this is my own personal bot that only my server has
in the server? or the player limit?
Server
1,183
that would be wild lol
honestly, why dont u use slash commands to submit answers?
Yea
nobody else can see your commands if u make it ephemeral
during the game? would that require a database?
not really
Nah
just use smth like /submit something I did but forgor
where anything after submit is the answer you'd write in the channel
then save it on the array as you'd do already
He could save it in MySQL but that would require a Database
once the game start, can i have it create a button that will allow them to input their “confessions” ?
Ye
modal?
yes there it is
thank you
this would be just better than creating and deleting channels
form
feeling cute might make my own lang & compiler (in typescript ofc)
Make it in rust
So much better than ts or C++ for compilers
Atwood's law bitch!
rewriting llvm in javascript
I wanted to create my own esolang but idk didn’t really go well
Yeah there’s bindings
you should integrate llvm with your breakfast lang fr fr
I was trying to use Cranelift for it
But I just never got past the typechecking phase
why?
Got distracted with other stuff
Hi, Is it possible to get feedback on a bot listing that was denied / speak with the reviewer? It was listed that the main feature is not working, and attached was a screenshot of the feature working exactly as it should 😅
Write him a private message, they should reply within 24 hours
Alright, thank you 😄
Does anyone know how I can assign multiple ips to my own host?
Like does my router actually accept multiple dhcp requests assuming that I already joined the network?
Because I don’t think I can just change my iptables to route different packets through different ips.. like the router must first confirm it’s not duplicate?
nvm my ugly ahh just discovered proxies
so... does anyone know good proxy sites/api's? Also, i am not doing something illegal lmao, but i am using proxies on my own site to hide users that are interacting with each other.
yup!
I don't want people to ddos each other lmao, so i want to use proxies.
To be fair, when using proxies it's forwarded to the real host ip and you'll not be able to use e.g. wireshark to intercept that traffic (as far as my understanding goes).
Depends on if you use TCP or UDP. There's plenty for your use case. You might want to use keywords like "relay"
it's a vc, so i am going to use udp. TCP would be too slow.
Idk i found some proxy sites online and they offered 1000 proxies for 5 dollars a month, but are these proxies like, lifetime? Or do i need to replace them every x months or so
They probably mean only proxy 1000 connections
Which is trash. Use your own infrastructure
Depending on concurrent users, you'll need multiple high bandwidth servers and the systems themselves don't have to be too powerful. RAM might be a concern depending on how many bytes you allow per chunk of data and how many connections your uplink supports or you want to put per server
i cant imagine it'd be too difficult
in theory a region is just a server which has each user connect via a udp connection
server then broadcasts packets received by each user to each connected user
unless you want it to be peer to peer but that'd expose each users ip
i am fine with spendig like 50$ a month, they offer like 100k proxies for that price.
how so?
ok i am stuck
but im kind of scared to post what i need help with because i used chat gpt a little bit
pls don't judge me, i'm still learning
Just ask your question
yh
Personally, I think I've gotten used to the code written by chat gtp after what I saw on Discord Developers 
so in reference to this
i ended up just having members type in their confessions in a modal.. but im stuck on getting the bot to display the messages at random without including the author information in an embed 1 by 1 so that people can guess the @ mention of the person who wrote it
i'd like to show someone what I have so far (whoever is willing to help) but idk if it's better to invite to the server to see it or just posting the code here. or both?
Post your code here
Now I want to see the code 
not familiar with this method.. i'm pretty new at this and have learned so much! I'll learn this method of randomizing
willdo!
if you dont want the chance of duplicate entries its easier to shuffle the array but if not that then yeah
Sorry I may have come off as somewhat condescending in that, did not mean it that way
How does generating a random index here work over shuffling it
Although I’m seeing now that he wants all of the entries in random order not just picking one
if youre only doing it once it doesnt matter
So yeah shuffling is fine
yes it's supposed to only show once
I see array shuffling and I immediately assume it’s because someone wants a random entry
Yuh, I was about to say :p
once someone guesses correctly or after 2 minute, it will randomly select another message in the array
correct
so basically, the members will input as many messages as they want in the modal and it'll save in the array. after 2 minutes, the bot will send the messages 1 by 1 at random in an embed without the authors info and the players have to @ mention who they think wrote it
alright then yea, you dont need to shuffle the array
If you are getting just a random entry you can do what waffle said and just generate a random index
array[Math.floor(Math.random() * array.length)]
i'm stuck at the part of having the bot pull the messages from the array and putting them in the embed
would this repeat any messages as chloe mentioned?
you can pop it off after you get it
is that a more effective way of randomizing what messages are displayed for them to guess the author of the message?
I mean yea, cause then you aren't looping over the array
https://pastes.dev/6QtTPIpUH2 @sharp geyser
btw, there is no discriminators anymore
Also, what you are saying you want to do and what your code shows you doing, is not matching up
for the console logging?
I've only gotten as far as the messages being saved after members are typing them in the modal, disabling the modal button after 2 minutes and an announcement sent that it's time to guess
am i biting off more than i can chew? lol
what does this button do?
finally got passive effects designed in my game bot! this is how it'll look internally
each effect has 3 phases
start, end, after
when the effect is activated, the script in on_start is executed under duktape, which can modify the player and game world, and set key-value store flags
after duration seconds, it moves to the end phase, and the code in on_end column is executed, again, this can modify the user and game world around them
and again after withdrawl seconds, the on_after is executed, if both withdrawl and on_after are non-null
the type and requirements indicate what the player must have available to trigger it, in this case all 3 are spells that the player must have, with enough mana available to cast them
the first two temporarily boost stats, and then have a withdrawl period where the stat is lowered, then the stat goes back to previous value, unless its current value at time of ending the effect is lower, then the lower is kept
the last one changes someones profession for a day, but only once per week
and yeah, duktape scripts are ES5, come at me bruh.
cant, I use the same method
but groovy
also for the love of your sanity, get intellij ultimate
so u can have code checking inside database editor
there's so many libs and stuff that this is barely rust tbh 😭
Does anyone here host a bot using Digital Ocean?
i use do but not for hosting a bot
they were just a cheap options i found with good reviews
either way, im trying to use digital ocean to keep my discord bot up 24/7. I dont know how to run my python script even after my linux terminal is closed
You’ll need something like screen
apt-get install screen
Then look up a tutorial for screen
screen -S mylovelybot
to exit without killing it, ctrl + a, then ctrl + d
to continue, do screen -r mylovelybot
what the null doin there
Hello
kuu is a company????
I'm a JavaScript, TypeScript, NodeJS, Deno, and Bun Developer













