#development

1 messages · Page 211 of 1

limber wigeon
#

I'm not worried, i got this. It was more about the theoretical virtue of calling a database intensively for a purpose that Discord already knows how to handle if the admins setup the server properly.

green kestrel
#

once you get to a certain size free hosts just dont cut it

limber wigeon
#

I run too many apps/bots so i went for an EC2 on Amazon.

lament rock
#

I can run my bot on the free tier of Heroku

green kestrel
#

i have four bots, i have two dedicated servers at OVH, two bots on each

lament rock
#

at 10k guilds

green kestrel
#

i wouldnt trust any free host with my bots that have premium

#

theyre too much of a hacker target, if youre taking money

lament rock
#

host off an rpi

green kestrel
#

if you really want to do that make sure:

  1. you get an nvme hat, DONT USE AN SD CARD
  2. ensure your internet is up to snuff
  3. make SURE you have a UPS
#

people dont like slow bots that constantly go offline

gusty linden
lament rock
#

I have a number of bots for private use

#

No UPS sadly. I want one

#

gigabit internet though

gusty linden
lament rock
#

if it connects to WAN, it can get attacked

pine willow
green kestrel
#

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

green kestrel
# lament rock gigabit internet though

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

frosty gale
#

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

green kestrel
crystal yew
#

How do I add images to my description like how PokeMeow has?

frosty gale
#

ez

crystal yew
#

Thank you!

tender ermine
#

So html

frosty gale
#

yessir

#

i wanna test out how well top.gg sanitises the html but submitting a bot takes time

solemn latch
#

what do you thinking of testing?

hybrid maple
#

But i swear i didn’t copied resist

bitter granite
hybrid maple
eternal osprey
#

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)

deft wolf
#

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

limber wigeon
#

There is an article on the discord doc to delete all and rebuild all commands (/)

#

delete all, then this

surreal sage
#

i once met a 'typescript' dev who puts all types as any and throws @ts-ignore wherever he could

spark flint
#

lol

#

i do that

#

thats why i just use js now

lament rock
#

that's not…

#

Then what's the point!?

quartz kindle
quartz kindle
#

and twitter bio

pearl trail
#

and discord bio

#

poker_star I'm a JavaScript, TypeScript, NodeJS, Deno, and Bun Developer JS TSnodejsdenobun

pale vessel
#

add in deno and bun too

limber wigeon
#

is bun copium?

frosty gale
#

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

quartz kindle
#

"rejected for being overqualified"

pearl trail
quartz kindle
#

we're gonna be here a while

frosty gale
#

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

limber wigeon
#

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

knotty pendant
#

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.

slender wagon
solemn latch
knotty pendant
#

It does

lament rock
#

Not on the if user is none

#

But it looks like that branch is ignored regardless

knotty pendant
#

Right

solemn latch
#

Top.gg can also send retries if a certain amount of time has passed, even if the request hasnt timed out.

knotty pendant
solemn latch
knotty pendant
quartz kindle
knotty pendant
#

Yeah

quartz kindle
frosty gale
#

lol

eternal osprey
#

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.

lyric mountain
#

uh ok, how did you "run" using 2/16/32 cores?

eternal osprey
#

i used my school's server

pine willow
#

O.O

lyric mountain
#

not the question

eternal osprey
#

your question has too much ambiguity

lyric mountain
#

HOW did you make it run on 2/16/32 cores?

eternal osprey
#

what do you mean

#

ah

lyric mountain
#

like, code

eternal osprey
#

openMPI

lyric mountain
#

the hell is that

eternal osprey
#

💀

pine willow
eternal osprey
#

fast hands

#

it's a way to run parallel programs

pine willow
#

"Open Source High Performance Computing"

eternal osprey
#

allows a way to section parts of codes, run in parallel, gather all data to the main source, it's really fucking great.

lyric mountain
#

got even more confused, but anyway

pine willow
eternal osprey
#

nah lemme run an example

#

yall have to understand

lyric mountain
#

what language are we talking about?

eternal osprey
#

c

pine willow
#

ew

lyric mountain
#

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

eternal osprey
#

open MPI automatically creates new processes on the amount of cores you have

lyric mountain
#

that's likely threads still

eternal osprey
#

hmm it may

lyric mountain
#

the thread count is usually double the amount of physical threads

eternal osprey
#

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

lyric mountain
#

if that was true, setting it to 8 cores would deadlock your pc

eternal osprey
#

why?

lyric mountain
#

a cpu only has so many cores

pine willow
lyric mountain
#

afaik only the OS has direct control on them

#

but anyway, lets go back a little, why are u using it?

eternal osprey
#
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)
pine willow
#

amd epyc nice

eternal osprey
pine willow
#

can you show me your server?

eternal osprey
#

the sequential version is wack, and i want to make it parallel.

lyric mountain
#

why cant you multithread from the code?

eternal osprey
eternal osprey
#
  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);```
lyric mountain
#

well, I'm unsure anyone here will be able to answer your question then

#

not even once have I heard abt that lib

pine willow
eternal osprey
#

Why am i learning all types of fucking bs that apparently no one uses

lyric mountain
#

that's a good question

eternal osprey
#

fr, especially big data course got me tweaking

#

talking about hadoop, map reduce, apache spark

lyric mountain
#

for multithreading I'd just do it myself, if the task is clearly defined it's pretty easy to handle synchronization of data

eternal osprey
#

get the fuck outta here

eternal osprey
#

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

lyric mountain
#

I have bachelor degree on SDA, wanted to do some robotics but nothing available nearby

eternal osprey
#

what's sda?

lyric mountain
#

system development & analysis

eternal osprey
#

ah i see, damn that's sick!

#

you should definitely pursue robotics, but its fucking hard

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

eternal osprey
#

it's MPI

#

open MP is another libarary

#

i am mixing the 2 names

lyric mountain
#

Impressive, I didn't understand a single word from the short desc

#

Oh nvm, june

eternal osprey
#

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.

lyric mountain
#

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

eternal osprey
#

I see, thanks for the help! I can always rely on you 🤞🏽🤞🏽

frosty gale
#

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

round cove
#

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.

lyric mountain
#

whatever he's using is trying to use the actual cores

quartz kindle
stark abyss
bitter granite
#

@ivory siren here too ^

undone warren
#

Is topgg down?

north turtle
#

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

frosty gale
#

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

north turtle
#

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...

sharp geyser
#

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

solemn latch
#

Intents are not goals, tbh you want to have as few intents as possible.

sharp geyser
#

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

#

😔

solemn latch
#

Thankfully you can set your cache for specific things now

sharp geyser
solemn latch
#

13? I don't remember

north turtle
#

Ok i'll try without any intents
like mind of "Intents are not a goal"

#

thanks everyone

lyric mountain
#

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

knotty pendant
#

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?

sharp geyser
#

uh

#

are you sending this to every server its in?

knotty pendant
#

Not necessarily

lyric mountain
#

well I simply don't

sharp geyser
#
  1. You should never need to do this
  2. You can't solve this with your bot
lyric mountain
#

you might post on your own server in an announcements channel, then have interested mods follow that channel

#

let discord broadcast the message

knotty pendant
#

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?

sharp geyser
#

In such a case just restart the game

#

No need to carry over

knotty pendant
#

It's an endless game with no start and no end. Idk if you've ever used the TorD bot

lyric mountain
#

well, you can resume the game by storing the game state on a database

sharp geyser
#

yea

lyric mountain
#

simply re-attach the button listeners at boot

sharp geyser
#

I am confused on how you are hitting this rate limit

knotty pendant
sharp geyser
#

no

knotty pendant
#

Then there is no way to do it

sharp geyser
#

Yes there is

#

Do it like haku said

lyric mountain
#

load the file on start

#

just make sure to also store the message id so u can fetch it

knotty pendant
frosty gale
#

job market is actually cooked for juniors

real rose
#

my favourite junior roles

frosty gale
#

junior at this point is just a keyword for "we want a senior but we want to pay you like a junior"

real rose
#

similarly, I think Linkedin's "Entry level" filter is overused

#

for stuff like this

frosty gale
#

on linkedin that tag has absolutely no meaning

#

pretty sure they just select all tags at this point

sharp geyser
#

yep

#

I saw a position for a software engineer that required 8 years of experience

#

it was labled as a junior position

frosty gale
#

and they want you to know all the methodologies

#

⭐ agile 🌠 and ⭐ scrum 🌟

sullen kelp
#

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

deft wolf
#

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 kappalul

sullen kelp
#

Gotcha

#

So what’s it mean by “Obvious point of entry”

real rose
#

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

sullen kelp
#

I see

harsh nova
#

I love senor entry level roles!!! yippie

sharp geyser
#

Its a junior level position

#

but you need 20 years of experience in fortran

lament rock
#

Probably amout the time it'd take me to understand fortran

harsh nova
frosty gale
lament rock
#

jk. I can read assembly. It doesnt get worse than that. Except binary I guess but lord forbid

sharp geyser
#

Also a personal connection with Steve Jobs

lament rock
#

Must have connections in the industry

sharp geyser
#

ong

#

even if its beyond the grave

lament rock
#

Me and Einstein were tight 💪

sharp geyser
#

with a connection of that level, I can give you an internship at best

harsh nova
#

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

sharp geyser
#

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

quartz kindle
#

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

lament rock
#

Or companies look better to investors with more fake jobs and more applicants

quartz kindle
#

also true

#

we literally live in a fake ass world

harsh nova
#

I love big data. Big data is our friend

lament rock
#

Not surprised tbh

#

I like FOSS

quartz kindle
#

i like foss too

#

but you know

#

moneys

harsh nova
#

I know what monkeys are

#

oh. Moneys

sharp geyser
#

💀

frosty gale
#

they found the person but they keep promoting the job on job boards anyways

#

quite disrespectful of peoples times

frosty gale
#

unfortunate truth is it happens all the time

quartz kindle
#

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

frosty gale
#

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

eternal osprey
#

hey cuties

eternal osprey
lunar geyser
#

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

eternal osprey
#

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

frosty gale
#

big data is just a stupid buzz word

#

like devops

quartz kindle
#

true, i still have no idea what those job titles actually do in practice

green kestrel
#

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

north turtle
#

Hello, i have a question. Which of the two should I do first?

#

Or does it not matter?

sharp geyser
#

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

north turtle
#

thanks

north turtle
#

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?

eternal osprey
#

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

sharp geyser
#

who are you even talking to

deft wolf
frosty gale
#

the amount of bots that lie about these data storage policies is definitely a lot lol

green kestrel
#

seems google is trying to tell us something

green kestrel
#

nah

north turtle
#

uhh

green kestrel
#

just say you periodically remove data that hasnt been interacted with within 30-90 days

#

pick one

north turtle
#

i just scared to discord dev teams

green kestrel
#

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

frosty gale
#

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

north turtle
#

anyway.. thanks everyone

quartz kindle
#

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

lament rock
#

Bruh

sharp geyser
#

I sell it to big data

lyric mountain
quartz kindle
sharp geyser
#

uh

#

thats public information

quartz kindle
#

i havent experienced it myself, but i've seen people failing to verify because they dont delete ids

sharp geyser
#

Why are they so strict on it

lyric mountain
#

like goddamn

sharp geyser
#

Now I want to make a bot and get it verified asap 💀

quartz kindle
#

lmao

sharp geyser
#

Test the limits of their data deletion policy

quartz kindle
#

its like

sharp geyser
#

It's kind of dumb they will deny you for storing ids past 90 days

quartz kindle
#

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

sharp geyser
#

💀

#

Yea no

lyric mountain
#

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

sharp geyser
#

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

quartz kindle
#

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

sharp geyser
#

How do you track deleted accounts

quartz kindle
#

because they created new accounts but were still using the content from the deleted accounts

sharp geyser
#

because people can make their account look deleted

quartz kindle
sharp geyser
#

oh yikes

#

That had to of sucked

quartz kindle
#

it took a few days

#

was running like one get every 5 seconds

sharp geyser
#

This is why I said it was virtually impossible to track deleted accounts

#

imagine if top.gg had to do that

#

💀

lyric mountain
#

imagine if discord deleted accounts older than 90 days

#

ik people who went missing for like half a year then come back normally

quartz kindle
#

imagine companies taking the same restrictions they force on users and applying it to themselves

sharp geyser
#

I went MIA for an entire year

terse bloom
#

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

sharp geyser
sharp geyser
#

👍

frosty gale
#

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

frosty gale
sharp geyser
#

Uh

#

IDs are public information

frosty gale
#

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)

sharp geyser
#

chatgpt the best lawyer

frosty gale
#

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

sharp geyser
#

Well I will store data for as long as its needed

#

GDPR can come catch these hands if they have a problem

sonic axle
#

you don't want to mess with GDPR

sharp geyser
#

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

sonic axle
#

ok so your bot knows when someone is european or not when they use the bot?

frosty gale
#

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

sonic axle
#

100%

#

hence why they enforce the bot to have its own terms & privacy policies

sharp geyser
#

Bah I will just ask chatgpt to write that up for me

sonic axle
#

🤣

#

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

frosty gale
#

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

sharp geyser
#

I mean yea

frosty gale
#

so they also fall under the right to be forgotten doctrine

sharp geyser
#

but the fact they require you to only store it for 3 months at most is kinda wack

sonic axle
#

as long as it's identifiable it counts

sharp geyser
#

?

sonic axle
#

privacy laws are wack

sharp geyser
#

That's not the point

#

Depending on the bot, that destroys its functionality

sonic axle
#

that's a design issue

sharp geyser
#

Not really

sonic axle
#

yes really, there are so many workarounds

lyric mountain
#

also an ID cannot be used to identify a specific user UNLESS you share a server with them

lyric mountain
#

in which case you'd have the ID anyway

lyric mountain
sharp geyser
lyric mountain
#

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

sharp geyser
#

and if you are using the bot api, you HAVE to have the bot sharing a server with them

sonic axle
#

it's identifiable whether you want it to be or not

sharp geyser
#

no...its not

lyric mountain
#

how do you identify an user by their id?

sonic axle
#

right

lyric mountain
#

as i said, in that case you already have the info

sonic axle
#

doesn't need to share a server

lyric mountain
#

738832022038118472

#

go on

#

tell me who that is

sonic axle
lyric mountain
#

ok that was unexpected

sharp geyser
#

What even is that from

lyric mountain
#

me

#

my alt specifically

sonic axle
#

user ids are identifiable whether you like it or not

sharp geyser
#

How are they querying this tho

#

Through what

sonic axle
#

discord's api

deft wolf
lyric mountain
#

no idea, this account is only in 1 specific server

sonic axle
#

doesn't matter whether you have to "get it first" or not

sharp geyser
#

Cause if the user has signed in through oauth or invited the bot then ofc its possible to get the user information

sonic axle
#

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

lyric mountain
sharp geyser
#

Isn't discord breaching its own rules

#

💀

sonic axle
#

no, lol

lyric mountain
#

that account only joined my support server for testing purposes

sonic axle
#

discord can store your information as long as it's within scope for the platform

quartz kindle
#

all users can be fetched, it doesnt matter if you share servers or not

#

done that many times

sharp geyser
#

That's wack

deft wolf
sharp geyser
#

That should not be a thing

lyric mountain
quartz kindle
#

there are no restrictions whatsoever for GET /users/id:

sonic axle
#

^

sharp geyser
#

that's wack

sonic axle
#

it is what it is

sharp geyser
#

what is the base url for the discord api anyway

quartz kindle
#

ye

lyric mountain
#

so I suppose I could just hash the user id then, this would remove any identifiable data from the database

sonic axle
#

that, and offer a way for users to delete that data

#

& expiry

lyric mountain
#

the intent is exactly not having an expiry

sharp geyser
#

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?

lyric mountain
#

cuz turns out people get mad when they go AWOL and come back to find all their data missing

spark flint
#

you have to account for GDPR regardless according to discord bot dev terms

sonic axle
#

yes, but i'm not talking about Discord specifically

spark flint
#

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

sonic axle
#

Discord collects data on EU users, so that's a given

quartz kindle
#

why are california laws separate from US laws

sonic axle
#

because they can, i guess 🤣

sharp geyser
#

california has its own laws against privacy

quartz kindle
#

the US is wack

sharp geyser
#

uhm sir

#

Every state has its own laws

#

💀

quartz kindle
#

mumbo jumbo country

#

lmao

sharp geyser
#

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

sharp geyser
#

Reservations have their own laws as well

quartz kindle
#

US did the europe thing before it was cool

sharp geyser
#

if you murder someone on tribal land then they have the final say on what happens

#

state can't intervene

quartz kindle
#

thats an odd information to know

#

lmao

sharp geyser
#

Well its because its happened

#

I studied history a lot

quartz kindle
#

the kurwa dude is taking notes

sharp geyser
quartz kindle
#

bobr kurwa

#

ja pierdole

#

:^)

deft wolf
#

I rarely use this word kappalul

quartz kindle
#

i love the word

sharp geyser
#

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

#

💀

quartz kindle
#

most americans dont know anything tbh

sharp geyser
#

"Who led the revolutionary war"

#

"Abraham Lincoln"

quartz kindle
#

lmao

sharp geyser
#

I used to be good at geography

quartz kindle
#

ask random americans to show where north korea is in the world map

sharp geyser
#

I can do it

#

Okay nvm the blank maps im finding sucks

deft wolf
sharp geyser
#

Its like 30px

sharp geyser
quartz kindle
sharp geyser
#

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

harsh nova
#

I love Getty Images

sharp geyser
#

ong

#

he was my favorite pres

#

Also pretty sure the top one is north korea

quartz kindle
#

looks like it

harsh nova
#

nah that is denmark bro trust

quartz kindle
#

especially since the colors give it away

#

:^)

sharp geyser
#

what do the colors have to do with it

quartz kindle
#

they mark the borders

sharp geyser
#

ok

quartz kindle
#

making it easier to figure out

sharp geyser
#

not really

#

anyone who doesnt know shit about geography (most americans) would claim that japan is korea

#

💀

quartz kindle
#

i've seen worse

sharp geyser
#

Them damn North Korean Australians

harsh nova
#

why are we discussing this in dev chat

quartz kindle
sharp geyser
#

We are talking about the development of countries

quartz kindle
#

this is the location of north korea

#

according to americans

sharp geyser
#

Im sorry

#

who the fuck said the US

deft wolf
#

Wait a sec sus

sharp geyser
#

ALASKA????

#

Only 2 americans got it right (kinda)

harsh nova
#

so proud o them

sharp geyser
#

one was close enough

quartz kindle
#

this was another attempt some time later

sharp geyser
harsh nova
#

we are north korea

sharp geyser
quartz kindle
sharp geyser
#

ofc people 65 and up would know

#

they took part in the korean war

#

💀

#

if they didn't then that would be scary

harsh nova
sharp geyser
#

L bozo

harsh nova
#

(I sometimes gotta do actual moderation so I dont get demoted)

sharp geyser
#

this is general 3

#

lets be real

quartz kindle
#

this is my general

sharp geyser
#

ong

#

tim is locked here

harsh nova
#

I will sent you to general 4 (rules only role) if you dont watch out

sharp geyser
#

he can only talk to people here

harsh nova
#

yeah tim has an excuse. This is Tims land

quartz kindle
#

:^)

sharp geyser
#

he gave me permission

#

So HA

lyric mountain
sharp geyser
#

we all know they live in the water

radiant kraken
#

fr fr

eternal osprey
#

Can I set the bot status to offline in discord

deft wolf
#

Yes

#

But why tho

frosty gale
#

some people are like that

sharp geyser
#

Such a useless thing

eternal osprey
#

i just wanted to know

#

tf

pearl trail
pearl trail
#

something that's supposed to work in the background, who knows

#

¯_(ツ)_/¯

sharp geyser
#

I just dont understand why discord allows it

#

it makes no sense

#

not taking it out on ya

next junco
#

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?

sharp geyser
#

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

solemn latch
#

Thanks for the info

near sorrel
#

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

radiant fiber
#

how do i add images onto my bots top.gg page?

lyric mountain
#

like this

#

mods pls fix the regex

radiant fiber
#

will this dipaly it below it ?

solemn latch
radiant fiber
lyric mountain
#

it'll display where you put it

radiant fiber
lyric mountain
sharp geyser
#

You need the !

radiant fiber
#

k

sharp geyser
#

Otherwise it’s a normal hyperlink

radiant fiber
#

how to add bold example?

lyric mountain
#

if u dont put the ! it becomes a masked url

lyric mountain
solemn latch
sharp geyser
#

Same way you just did

radiant fiber
sharp geyser
#

Discord supports most of the markdown you’re trying to use and top.gg does as well

#

So it will translate over

oak cliff
#

why are yall getting flagged

pine willow
#

dangerous

oak cliff
#

youre all banned

sharp geyser
#

Cause the regex is too broad

oak cliff
#

just dont embed links stinkies

solemn latch
oak cliff
#

ill give a custom role for a week

lyric mountain
lyric mountain
sharp geyser
#

Love internet is down

pine willow
oak cliff
#

no u

pine willow
#

YOU!

oak cliff
#

YOU

pine willow
#

YOU x2

sharp geyser
#

Understandably so

#

But still

lyric mountain
#

just noticed

#

what the hell

deft wolf
#

This is probably against those scams that mask links under fake Steam gifts links

lyric mountain
#

well yeah, but it's capturing any masked url somehow

solemn latch
#

Yeah, discords regex is funky

solemn latch
#

Plus it would allow this

`

test

`

#

oh well that would be okay

deft wolf
solemn latch
#

I thought single ` only was for one liners

lyric mountain
#

test newline

#

oh

#

TIL

solemn latch
#

I feel like that changed at some point

lyric mountain
#

judging by the clipped endings, I'd say this is a side-effect of spaghetti code

deft wolf
stuck dawn
#

Hello, does anyone knows how can i make this stroke this is the code for drawing a menu item (this is a radialmenu)

lyric mountain
#

stroke u mean the border?

stuck dawn
#

im using svg so i said stroke 😆

lyric mountain
#

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

stuck dawn
#

also i just want the border to appear when i hover the item

lyric mountain
#

ah

stuck dawn
#

not the entire circle

#

something like this

lyric mountain
#

well, did u draw the lighter bg behind the car already?

stuck dawn
#

just changed the fill color

lyric mountain
#

then use the same code again, but do not fill

stuck dawn
#

a game

lyric mountain
#

not set "fill"

#

use borderWidth (or whatever it's called there) to set how thick it is

stuck dawn
#

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

quartz kindle
#

i'd draw an arc on top

#

using path

stuck dawn
quartz kindle
#

but you can also do a stroke using dash-array

#

its a bit troublesome to calculate

stuck dawn
stuck dawn
#

for each item

quartz kindle
#

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...

stuck dawn
#

but where the stroke begins? how can i control the side where it appears?

quartz kindle
#

you can also use percentages and em and other metrics

quartz kindle
#

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

stuck dawn
stuck dawn
quartz kindle
#

hmm, i dont really know what the percentage is based on

#

im guessing its not the perimeter

#

there is also a stroke-dashoffset

stuck dawn
#

this is strokeDasharray: '15% 50% 60% 50%'

quartz kindle
#

that you can use to offset the starting point

quartz kindle
stuck dawn
#

almost

#

that tiny thing on the right

quartz kindle
#

so increase the second 50% a bit

#

like 0 50 52 50

stuck dawn
#

yeah

#

perfect

#

tysm

quartz kindle
#

although this is basically going at it blindly, not an exact calculation

stuck dawn
#

yeah i know 😂 but it works thats what i need

quartz kindle
#

xD

stuck dawn
#

idk why this is happening if you have any idea.. like it cuts the stroke

#

for some reason

quartz kindle
#

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

quartz kindle
quartz kindle
#

so you will need to either increase the size of the image a bit, or reduce the position of the stroke

stuck dawn
#

ok

quartz kindle
#

ie if the stroke is 2px, make the arc 1px less radius

stuck dawn
#

thank you, also thank you @lyric mountain

quartz kindle
#

you can also do clip/mask shenanigans

stuck dawn
#

i use this formula to rotate the menu items

past field
#

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?

lyric mountain
#

sure, if you dont mind losing everything when you shutdown the bot

past field
#

yes the messages will essentially be erased after each game anyways

lyric mountain
#

databases aren't mandatory, you just need it if you want to persist data

past field
#

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

lyric mountain
#

2 issues that I did notice already

past field
lyric mountain
#

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

past field
#

yes i have the bot create the channel for each individual player, so only the player and admin can see the channel

lyric mountain
#

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

past field
lyric mountain
#

as you cannot have per-thread permissions

past field
#

ahhh ok i see

lyric mountain
#

at least I think you cant

lyric mountain
#

unless you use either a language model (aka AI) or fuzzy matching (which is faaaairly hard to get working on full sentences)

past field
#

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

past field
pine willow
#

Yes if you run it once

#

Now simulate it with 8 servers doing this

lyric mountain
#

each server with like 10 players

pine willow
#

Yes

lyric mountain
#

ultimately things that rely on channel creation are heavily gated by how fast discord allows you to do it

pine willow
past field
#

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

pine willow
#

How many members?

#

100?

past field
#

in the server? or the player limit?

pine willow
#

Server

past field
#

1,183

pine willow
#

Now imagine 30 of them playing

#

Or more

past field
#

that would be wild lol

lyric mountain
#

honestly, why dont u use slash commands to submit answers?

pine willow
#

Yea

lyric mountain
#

nobody else can see your commands if u make it ephemeral

pine willow
#

Yes

past field
#

during the game? would that require a database?

lyric mountain
#

not really

pine willow
#

Nah

lyric mountain
#

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

past field
#

hm

#

i’m also thinking

pine willow
#

He could save it in MySQL but that would require a Database

past field
#

once the game start, can i have it create a button that will allow them to input their “confessions” ?

pine willow
#

Ye

past field
#

what’s it called where people can type in responses?

#

like this? i can’t remember

craggy pine
#

modal?

past field
#

yes there it is

#

thank you

#

this would be just better than creating and deleting channels

summer torrent
#

form

surreal sage
#

feeling cute might make my own lang & compiler (in typescript ofc)

radiant kraken
#

why not in C++ and make it compiled with llvm

wheat mesa
#

So much better than ts or C++ for compilers

surreal sage
#

rewriting llvm in javascript

radiant kraken
#

can you work with llvm in rust tho

eternal osprey
#

I wanted to create my own esolang but idk didn’t really go well

wheat mesa
radiant kraken
#

you should integrate llvm with your breakfast lang fr fr

wheat mesa
#

I was trying to use Cranelift for it

#

But I just never got past the typechecking phase

radiant kraken
#

why?

wheat mesa
#

Got distracted with other stuff

sand stirrup
#

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 😅

#mod-logs message

deft wolf
sand stirrup
#

Alright, thank you 😄

eternal osprey
#

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?

eternal osprey
#

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.

sharp geyser
#

are you doing some kind of p2p type stuff?

#

Kind of like how discord vcs work

eternal osprey
#

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).

lament rock
#

Depends on if you use TCP or UDP. There's plenty for your use case. You might want to use keywords like "relay"

eternal osprey
#

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

lament rock
#

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

frosty gale
#

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

eternal osprey
eternal osprey
past field
#

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

sharp geyser
#

Just ask your question

pine willow
#

yh

deft wolf
#

Personally, I think I've gotten used to the code written by chat gtp after what I saw on Discord Developers kappalul

past field
#

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?

wheat mesa
#

Post your code here

past field
#

it's discord.js v13

#

slashcommandbuilder

sharp geyser
#

If it’s big enough to be sent as a file put it in a bin

wheat mesa
#

Why does everyone shuffle the array

#

Just generate a random index

#

Infinitely easier

sharp geyser
#

Now I want to see the code mmLol

past field
past field
frosty gale
wheat mesa
#

Sorry I may have come off as somewhat condescending in that, did not mean it that way

sharp geyser
#

How does generating a random index here work over shuffling it

wheat mesa
#

Although I’m seeing now that he wants all of the entries in random order not just picking one

frosty gale
#

if youre only doing it once it doesnt matter

wheat mesa
#

So yeah shuffling is fine

past field
#

yes it's supposed to only show once

wheat mesa
#

I see array shuffling and I immediately assume it’s because someone wants a random entry

past field
#

once someone guesses correctly or after 2 minute, it will randomly select another message in the array

sharp geyser
#

so wait

#

you do only want 1 entry?

past field
#

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

sharp geyser
#

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)]

past field
#

i'm stuck at the part of having the bot pull the messages from the array and putting them in the embed

past field
sharp geyser
#

you can pop it off after you get it

past field
#

is that a more effective way of randomizing what messages are displayed for them to guess the author of the message?

sharp geyser
#

I mean yea, cause then you aren't looping over the array

past field
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

past field
past field
past field
#

am i biting off more than i can chew? lol

proven lantern
#

what does this button do?

green kestrel
#

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.

lyric mountain
#

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

wheat mesa
#

there's so many libs and stuff that this is barely rust tbh 😭

lavish drift
#

Does anyone here host a bot using Digital Ocean?

pearl trail
#

i use do but not for hosting a bot

lavish drift
#

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

lament rock
#

apt-get install screen

#

Then look up a tutorial for screen

pearl trail
#

screen -S mylovelybot

#

to exit without killing it, ctrl + a, then ctrl + d

#

to continue, do screen -r mylovelybot

lament rock
#

I just use screen -x

#

cuz only 1 screen session

#

Having multiple is kinda weird

pearl trail
#

ah

#

i host multiple things so yeah

radiant kraken
#

it looks pretty decent

#

i'l make a pull request

pale vessel
#

what the null doin there

split cedar
#

Hello

civic scroll