#development

1 messages · Page 1624 of 1

pallid quail
#

it's more about learning to walk before you start running, we're not trying to insult you or anything but a bot is a very big thing to be starting with if you're just starting out

onyx hare
#

Does “/n” work in a webhook message?

cinder patio
#

yes

onyx hare
#

Great

umbral zealot
#

Yeah it's really not meant as an insult, Chadoxi. It's clear that you need to know some programming before making bots, because learning javascript while making a bot is like learning cooking while making beef wellington. It's not entry-level stuff.

spiral violet
#

hi guys, anyone know how long it takes until my bot is approved?

modest maple
#

1.2 millions bots enque rn

spiral violet
#

holy molly

wispy holly
#

guys what is the createEmoji's new command in discord.js?

umbral zealot
#

probably guild.emojis.create ?

wispy holly
#

ill try

feral aspen
#

What are good custom variables for guildMemberAdd?

umbral zealot
#

uhhh what are you talking about

#

"custom variables"?

feral aspen
#

I added {user} and {user_id}, but I thought I would use that for the author instead.

wispy holly
#

not worked ;-;

#

this is add emoji command

umbral zealot
umbral zealot
wispy holly
umbral zealot
tawny cosmos
#

I was basically talking about in general hackers cyber bullies that was the topic of today how you can resolve it beside going to go do all the extra

solemn latch
#

i linked to the docs which show how to create emojis

umbral zealot
#

Or in an infosec related guilds if you think you want to talk about hackers, which... we can't talk about here.

ivory comet
#

Bbg boos yb

wispy holly
#

@umbral zealot thanku

tawny cosmos
#

It was just a general topic of cyber bullying hacking you can do hacking in a appropriate manner and there's a wrong way of doing it that's what I'm talking about

#

As well I was making it known that on this platform hackers don't come in very much you know what I mean and so when they're coming in constantly the way they are or they have it's a pattern it's a sign it's a person doing it specifically revealing themselves how to retaliation

whole cape
#

guys

#

who have a profile code for a .json bot?

#

cuzmy profile code was probot 's profile

cinder patio
cinder patio
whole cape
#

ؤخكث يك

#

come dm

#

i will give you some fo my bot

cinder patio
#

No thanks

heady gazelle
#

what’s the link to the api website

heady gazelle
#

is there anything for servers

#

or no

cinder patio
#

nope

umbral zealot
#

There is no server API

#

But you can use webhooks.

sterile lantern
#

How would I make it so it gives a user 30-80% of a user's balance

e.g: a user robs me, they get 30-80% of my balance

ik about math.random but how would i make it so it gets 30-80% of the db value

heady gazelle
#

alright

umbral zealot
#

Well you have to choose a random value between 30 and 80 first

#

Then do the math on the db

cinder patio
#

money * rngNumber / 100

sterile lantern
#

Math.floor(Math.random() * 80) + 30;

#

hm

#

idk how to get 30-80

sudden geyser
#

That's 30-110 right now.

earnest phoenix
#

can someone help me make a bot like says please?

sterile lantern
sudden geyser
#

We can help you with certain issues/problems to solve

sterile lantern
#

would that work

#

wait nevermind i mean

#

50

#

not 70

sudden geyser
#

Try changing 80 to 50

sterile lantern
#

alr

earnest phoenix
sudden geyser
#

yep

#

you!

earnest phoenix
#

well, i am trying to make it so that people that everyone get a role taken away (role called Competitor) then then people that have the role Complete get the role added back. This is my code for the role part so far:

const compRole = message.guild.roles.cache.find(r => r.name === "Competitor");
const otherRole = message.guild.roles.cache.find(r => r.name === "OtherRole");

members.forEach(member => {
    if (!member.roles.cache.has(compRole)) {
        member.roles.remove(otherRole);
    }
});```
sterile lantern
#

if i do math.Random it generates a random decimal from 0 - 1

let chance = Math.random

if(chance >= 0.6)
// success
if(chance <= 0.6)
#

so does if(chance >= 0.6) a 60% chance

#

i want 60% chance for success 40% for failure

cinder patio
#

sounds about right

sterile lantern
#

for the 40%

#

if(chance <=0.6)

#

would that work

#

meh i dont think that would

#

if chance <= 0.4

cinder patio
#
if (chance >= 0.6) {
   // More than 0.6 - Which means 40% chance
} else {
   // Less than 0.6 - Which means 60% chance
}
sterile lantern
#

oh so if chance >= 0.6 that means failure

#

hmm alr

sudden geyser
#

Just by looking at your code. I'm not sure.

sterile lantern
#

so, when i fetch my db value

#

it will print as an integer

#

so if i just did

#

userbal * random

#

would that work

cinder patio
#

no

cinder patio
sterile lantern
#

y would i need to / 100

#

if it prints out as a w

cinder patio
#

Because it's a percentage

sterile lantern
#

oh

#

decimal

#

yeah

#

userbal * random / 100

#
const user = message.mentions.users.first() ||```
#

i want to make it so IDs work

#

rn its only tags

#

actually i want my ID and my tag (samm#0021) to work as well

slender wagon
#

can you use `` on a array?

umbral zealot
#

uhhh what do you mean "on an array"

wispy holly
#

why ı cant installing quick.db?

cinder patio
slender wagon
#

give me a sec

wispy holly
#

that always gives error

solemn latch
wispy holly
#

oh k

slender wagon
#
 const person = member.username
    const message = [`yooo ${person} welcome!`, ....
#

like to use it this way

umbral zealot
#

yeah sure, that's valid

#

same as single and double quotes.

slender wagon
#

oh okay thanks

#

ightys

umbral zealot
#

You could have just tried it, y'know. 😛

slender wagon
#

i did

#

but it gave me an error so it confused me lol

#

cannot send an empty message*

solemn latch
#

thats not from that line

slender wagon
#
 let finalmessage = message[Math.floor(Math.random() * message.length)]
``` ik but also can i do this?
earnest phoenix
#

This works a bit, it takes away the role but it still does it even tho i have the role "Complete". Can anyone help?

const compRole = message.guild.roles.cache.find(r => r.name === "Competitor");
const otherRole = message.guild.roles.cache.find(r => r.name === "Complete");

members.cache.forEach(member => {
    if (!member.roles.cache.has(otherRole)) {
        member.roles.remove(compRole.id);
    }
});```
cinder patio
#

.has accepts only a snowflake

#

you are giving it a Role object

earnest phoenix
#

ohhh

#

also, its not looping through everyone in the server. Can i fix that?

cinder patio
#

That's because discord.js doesn't cache all members by default

#

It only caches online members

#

and only up to 200 afaik

earnest phoenix
#

it still didnt work with 2 people with both online

cinder patio
#

You can enable the fetchAllMembers option in the client settings, but it's not recommended

#

And it'll be removed

#

in v13

lusty quest
#

wasnt it 100? iirc

cinder patio
#

could be

lusty quest
#

bcs i know the API will only return the first 100 guilds, i guess there will be a similar limitation for members

sterile lantern
#
let randomchance = Math.floor(Math.random() * 50) + 30; // 30-80
let randomamount = userbal * randomchance / 100```
#

why does this print a decimal

#

the user balance is 1321 and it prints 858.27

cinder patio
#

Round the balance

sterile lantern
#

the balance is a whole number though?

cinder patio
#

There aren't "whole numbers" in js, all numbers are stored as 32-bit floating points

sterile lantern
#

367 - balance
271.58 - randomchance
0.8 chance for success/failure

cinder patio
#

... just because it's a whole number doesn't mean that dividing it by another number will produce a whole number

#

Just Math.round the new balance

sterile lantern
#

oh

#

right

cinder patio
#

or floor, or ceil up to you

onyx hare
#

my userinfo command is selective, If the user doesnt have a custom status/ or playing a game the command fails to work, if the user is in a game/ custom status it works any-clue why its being selective

the line that causes the selective
```.addField("Playing", ${member.user.presence.activities ? DiscordController ${member.user.presence.activities[0].name} : ":redtick~1: Not playing"},inline, true)

also it throws an error saying that `${member.user.presence.activities[0].name}` is invalid when theres no running game or status
pallid quail
#

activities can still be defined but empty, so they wouldn't get back the first one

wispy holly
#

what should ı do?

#

help pls

craggy pine
#

install python?

wispy holly
#

from the web?

#

or ı need say npm install python?

slender wagon
#

how can i use .startTyping(); in a guildmemberadd

novel osprey
#

it's been more than 3 weeks since I added my bot ,, any info on how much more time?

mellow arrow
umbral zealot
novel osprey
#

thanks!

#

I am not complaining

#

just asking 😊

umbral zealot
#

And I'm just answering dogekek2

haughty mirage
#

yo, if i have a debian VPS, is there any way to control it other than just the command line - i.e like a normal computer?

quartz kindle
#

install a desktop environment on it

deft dawn
#

Hi

#

My name is Pablo Escobar

quartz kindle
#

ok

cinder patio
#

Isn't that a drug lord

gilded olive
#

mhm

sterile lantern
#
await message.guild.members.cache.some(member => member.user.tag === args[0])```
#

how do i get the ID from this

#

its defined as user1

#

it prints undefined

cinder patio
#

some returns a boolean value

sterile lantern
#

yeah

#

user1 prints true

#

so how would i resolve the ID from it

cinder patio
#

You need to use find in order to get the GuildMember object

#

instead of some

sterile lantern
#

oh

#

works ty

cinder patio
#

some = only checks if the member is in the collection
find = checks if the member is in the collection and returns the member

sterile lantern
#

it says Cannot read property 'id' of undefined

#

aka prints undefined

cinder patio
#

The member isn't cached then

sterile lantern
#

so would i be better of fetching them?

cinder patio
#

yes

scenic shale
#

good afternoon, sorry for the question, but do you have any average time for the approval of the bot?

royal portal
#

whats the best setinterval to have for setactivity

#

so i dont get ratelimited angeryBOYE

cinder patio
cinder patio
royal portal
#

would 15 seconds be fine

severe pike
#
        # get data from database
        count = 0
        times = []

        async for x1 in self.client.totalInfections.find({}, {'time'}):
            count += 1
            x2 = x1['time']
            times.append(x2)

        # you're gonna need to make a new list for that, where the index is determined by the hour in the date
        # you just always add to the last element of your new list unless the previous item in your times list had a different hour in which case append to the new list instead

        newNumbers = []
        previousX = None
        hours = {}
        if previousX is None:
            previousX = times[0]

        for x in times:
            try:
                if x.hour == previousX.hour:
                    hours[x.hour].append(x.hour)
                else:
                    previousX = x
            except KeyError:
                hours[x.hour] = [x.hour]
        print(hours)
        # make up some data
        x = times  # time
        y = hours  # amount to plot

How am i supposed to link it up to the necesary time? Little confused by that. My current code results in:

hours returns a dictionary with a key inside, th ewkey represents the hour where the data should be shown, and the list inside the dictionary is the amount of data which should be logged for that hour

sterile lantern
#
message.guild.members.fetch(member => member.user.tag === args[0])```
#

y doesnt this work

cinder patio
#

fetch doesn't accept a function

sterile lantern
#

epic bruh momento

cinder patio
#

learn to read the docs

sterile lantern
#

so is there no other way to get the user without the cache

#

via the tag

cinder patio
#

There is, kinda

sterile lantern
#

thonk

#

guild.members.fetch only works with an ID

cinder patio
#

no

#

you can give it a username

#

look at the examples

sterile lantern
#

i am rn

#

would this fetch all members

deft dawn
sterile lantern
#
guild.members.fetch();```
cinder patio
#

yes

sterile lantern
#

so then i can keep cache

cinder patio
#

It's not recommended though

deft dawn
#

I'm adding commands to my bot from bot desinger for discord

cinder patio
#

what's wrong with just fetching the first user with a similar username?

sterile lantern
#

what?

deft dawn
#

What

sterile lantern
#

hm

deft dawn
cinder patio
sterile lantern
#

ah

#
message.channel.guild.members.fetch({cache : false}).then(members=>members.find(member=>member.user.tag === args[0]))```
quartz kindle
#

Lol

sterile lantern
#

this would work, right

deft dawn
cinder patio
#

just 100

sterile lantern
#

cache?

#

im fetching

cinder patio
#

fetch*

sterile lantern
#

how do i fetch all members then

#

thonk

cinder patio
#

you shouldn't

#

I already told you what to use

quartz kindle
#

what are you trying to do?

#

find a user by name?

cinder patio
#

That's exactly why it exists

sterile lantern
#

tag

#

if a user responds with a tag (samm#0021), i want that to be transferred to their ID

quartz kindle
#

guild.members.fetch({ query: "samm" })

sterile lantern
#

samm#0021 or just samm

quartz kindle
#

just samm

#

its usernames

#

then filter the tag after

sterile lantern
#

oh

#

i see

#

okay ty

cinder patio
#

...

deft dawn
quartz kindle
#

wat

cinder patio
#

the fuck

deft dawn
deft dawn
craggy pine
quartz kindle
#

lol

grizzled raven
#

did he call you handsome

quartz kindle
#

i guess lmao

hidden lynx
#

guys I need your help. so my bot has already passed the 100 server limit for this but I can't enable those two switches??

craggy pine
hidden lynx
#

I know

craggy pine
#

So...... More of a question in the discord developers server mexShrug

hidden lynx
#

just curious if anybody wants to help me

#

true tho

#

alright I'll head over there

craggy pine
exotic galleon
#

hello i want to add voting obligation to my discord bot how can i do

lyric mountain
vivid fulcrum
#

vote or be executed

craggy pine
ancient nova
#

does anyone know java and know why is this happening? so I'm using canvas to make a circle, painted it in yellow (0xFFFF00) and it is yellow, but it has green outline, why?

exotic galleon
wicked crown
#

why this dont work?

ancient nova
quaint wasp
#
  if (error) {
      message.channel.send(`**ERROR IN CODE ACCURED! \n ERROR: ${error}**`)
  }``` with this, I catch an error?
ancient nova
#

it looks so weird, it shouldn't look like this 100% here is the code

circlePaint2.setColor(Color.YELLOW);
circlePaint2.setStrokeWidth(getDip(getApplicationContext(),2));
circlePaint2.setShadowLayer(
  50.0f,
  0.0f,
  0.0f,
  Color.parseColor("#FFFF00")
);
#

everything is supposed to be yellow, not red nor green

exotic galleon
#

how to get dbl wephook url

earnest phoenix
#

perm

vivid fulcrum
ancient nova
#

you mean like

#

it used the same paint over and over?

vivid fulcrum
#

i just looked up the docs for setShadowLayer

#

why are you using that

#

there's literally a method for drawing a circle??

#

why aren't you using that??

odd stratus
#

Does anyone here use Eris

#

The Eris docs is giving me kind of a headache since everything is so hard to navigate unlike discord.js's

opal plank
#

nope, i use detritus, the superior lib

#

what you need help with?

odd stratus
#

Just trying to search something up with the search function but it doesn't even seem to work thinking_2

exotic galleon
#

How do I make my discord bot command voting obligation

odd stratus
#

Wdym

ancient nova
#

@vivid fulcrum is therw anything better you'd suggest?

opal plank
#

i would highly recommend against that btw @exotic galleon ]

cedar frost
#

Someone speaks my name

ancient nova
#

I don't know any other methos to draw shadows using canvas

cedar frost
#

In call

opal plank
cedar frost
#

Sorry

vivid fulcrum
exotic galleon
ancient nova
#

nono, I have do use it

opal plank
#

no english}?

ancient nova
#

I created a paint

craggy pine
#

NGL Erwin, may take some inspiration from your top.gg page once the update happens. Kinda dig the transparent anime theme. Could make it Ikaros related.

opal plank
#

bad idea

ancient nova
#

to get a shadow

exotic galleon
ancient nova
#

then include the paint with the drawCircle

latent heron
#

tfw JS have a drawing circle method for webGL but GIMP won't let you make it as a basic shape by default

opal plank
vivid fulcrum
#

oh you want the shadow there

#

right

craggy pine
opal plank
exotic galleon
#

Can you help @opal plank

opal plank
craggy pine
#

I do block people from using only our NSFW commands with voting mainly because we didn't want to make them but people requested KEKW

exotic galleon
ancient nova
#

@vivid fulcrum I managed to do it, it was heavy compression, it pasted the same circle over 15 times, it was my map generators fault

opal plank
#

this is going to be super annoying cuz you dont know enligsh

#

what language you speak?

vivid fulcrum
#

interesting, i was about to blame canvas for not blurring it correctly

opal plank
craggy pine
opal plank
#

oof, i understand german but i dont speak a pint

opal plank
#

@exotic galleon can you use google translate on my messages?

craggy pine
exotic galleon
craggy pine
exotic galleon
#

yes

ancient nova
#

@vivid fulcrum yeah, sorry for the trouble

exotic galleon
#

can we talk from private messages @opal plank

opal plank
exotic galleon
#

okey

opal plank
#

you have webhook for vote?

exotic galleon
#

no

opal plank
#

you code in js?

craggy pine
exotic galleon
craggy pine
opal plank
exotic galleon
opal plank
opal plank
vivid fulcrum
exotic galleon
opal plank
# craggy pine ye

ive had MULTIPLE people actually dm me asking if i could remove all nsfw so they could use stuff on their server, and big servers too

opal plank
#

even after i explained them its nsfw only and stuff

exotic galleon
#

how

craggy pine
opal plank
#

partnered servers are a big nono for this sort of stuff

craggy pine
#

So they can just deal with it imo KEKW

opal plank
exotic galleon
opal plank
#

it has example

exotic galleon
#

I am waiting

opal plank
opal plank
exotic galleon
opal plank
#

no problem

exotic galleon
#

@opal plank

opal plank
#

Webhooks

exotic galleon
#

okey

opal plank
#

you want that ^^

exotic galleon
#

@opal plank Is it the right place?

#

@opal plank

exotic galleon
#

don't know

opal plank
#

put that in code, change app.listen(80) to 3005

#

port 80 bad

#

then go on top.gg, on your bot, and click settings

#

you need to put glitch ip there

exotic galleon
#

okey

#

I will open a new file and put the codes in the picture I throw in my bot project, otherwise I will put it anywhere.

#

@opal plank

#

index.js okey

#

@opal plank

#

what is the problem

#

@opal plank what should I do

crimson vapor
#

yes but also no

#

you need to understand what this is doing

#

you are creating a http server and adding the /dblwebhook route to it

exotic galleon
#

how do i create @crimson vapor

#

@crimson vapor

latent heron
#

someone will help you eventually my guy

exotic galleon
#

thnx

slim heart
exotic galleon
slim heart
#

👁️👄👁️

crimson vapor
exotic galleon
#

?

#

What is this

crimson vapor
#

express is the code you are using

granite crest
#

I dont even know how to code

exotic galleon
crimson vapor
exotic galleon
crimson vapor
#

@delicate zephyr you should switch vcs

lyric mountain
#

also, how are you converting the image to bytes?

wicked crown
#

why does it not respond?

quartz kindle
#

guildMemberAdd only works if you have "server members" enabled in your discord developer portal

opal plank
#

in current session

wicked crown
#

still not working

#

oh

quartz kindle
#

same with sharding

opal plank
#

i mean, thats not accounting for when discord bends itself over

#

once a week, basically

quartz kindle
#

what if they do it on purpose

#

to "fix" the flaw

#

xD

earnest phoenix
#

please a lot of help i used this php discord login apit and I want to indicate if my bot is present on the server or not the agents are stored in a bot subserver SQL database
API: https://github.com/MarkisDev/discordoauth

SERVER ID CODE

<?php
for($i = 0; $i < sizeof($_SESSION['guilds']); $i++) {
echo $_SESSION['guilds'][$i]['id'];
}
>
quartz kindle
#

commas, please?

austere zealot
#

i have gifs in one of my commands and it wont load||nvm got it||

opal plank
severe pike
#

Whats presence intent for

opal plank
#

status updates

severe pike
#

you need presence for that...

#

crazy

opal plank
#

correct

severe pike
#

Thanks home dog

quartz kindle
#

peoples status updates

#

not yours

severe pike
#

oh

#

I don't need that

ancient nova
lyric mountain
#

First of all, don't say canvas

#

You were using Graphics2D right?

#

But yeah, repeating gradient paints do cause that when stacked

crimson vapor
#

unless they are actually using javascript

lyric mountain
#

No chance, that code snippet was definitely java's graphics2d

crimson vapor
#

ah

severe pike
#

Ummm discord?

#

Wheres discords developer server

lyric mountain
#

You obviously cannot put "discord" in the bot's name

severe pike
#

discord isnt in my bloody name

lyric mountain
#

What's the app's name?

severe pike
#

same thing?

lyric mountain
#

Like, iirc there's both an app name and a bot name

dusky sundial
#

Yeah, there's a name for the app and a name specifically for the bot

odd stratus
#

Does anyone know how to fetch the thumbnail of a SoundCloud song or any npm package that can do that? I know how to do it for YouTube ones for my music bot but I'm not sure about SoundCloud ones

earnest phoenix
#

Maybe scrape the html?

solemn latch
#

soundcloud doesnt have an api for that?

#

yeah, i would just use the api

earnest phoenix
#

probably there is

#

never dealt with it

solemn latch
#

scraping i feel is always more work than just using the api.

solemn latch
#

or just get_tracks if you want to search by name

earnest phoenix
#

to query yeah, apparently it accepts id as well

pale vessel
#

Pretty sure registrations are closed

solemn latch
#

oh f

quaint wasp
#

Why does it do this?

#

My code is this:

#
      let giveawayE = new MessageEmbed()
        .setTitle(`${prize}`)
        .addField(`HOST: ${message.author}`)
        .setTimestamp(Date.now() + ms(args[0]))
        .setColor(`BLUE`);
      let m = await channel.send(`:tada: NEW GIVEAWAY! :tada:`, giveawayE);```
pale vessel
#

You can't put mentions in field names, Discord won't format them

quaint wasp
#

😐

solemn latch
#

also not filling in a field value makes it undefined

craggy pine
#

"Something", "something"

quaint wasp
#

I did field the field

#

oh

#

alr.

#

😐

#

Why can it not "send" it?

tight nimbus
#

winner?

lyric mountain
#

Because winner is not even a thing

rustic nova
#

winner is not a thing in a message object

earnest phoenix
#

Who codes in python?

umbral zealot
#

A lot of people, so if you have a question, it's best to just ask

quaint wasp
lyric mountain
#

Show me

quaint wasp
#

see im smart.

lyric mountain
#

...you do know how variables work right?

quaint wasp
#

Maby... ?

agile lance
#

it would be winner.send not message.winner.send >_>

#

anyways I have a question myself

lyric mountain
#

Winner is an user as it seems

rustic nova
#

the message object doesn't have winner though

agile lance
#

I deleted the code bc it was broken.

I was making a automod module for bot. When I made anti-swear, I had it loop through a array and check the message for any content (using .toLowerCase() for everything to make it not case sensitive) but if you say like "class" or "glass" or "glasses" it gets deleted bc it found a swear word within the message

dusky sundial
#

He has a variable called winner but tried to access it with message.winner

lyric mountain
#

Why? Your name explains it

agile lance
#

rip

quartz kindle
#

4ss

hasty mulch
#

How do I create an argument for a role in Python?

#

Like if someone has the Twitch Subscriber role, they get a certain boost in credits

earnest phoenix
#

if statement?

hasty mulch
earnest phoenix
#

What do you want to check it with? Name or Id?

hasty mulch
#

ID

earnest phoenix
#

You can do <Member>._roles.has(role_id)

#

assuming you're using d.py

hasty mulch
#

Yeah, I am

#

So if ctx.author._roles.has(role_id):?

#

@earnest phoenix

earnest phoenix
#

try it and see

hasty mulch
#

@earnest phoenix Can I do multiple IDs with this?

earnest phoenix
#

you can use any or all depending on your use case, do you want the user to have at least one of the roles or all of the roles?

#

How Can I Connect Heroky With VS code

#

So that i can see logs there

#

It takes a lot of time and fails in the end

hasty mulch
earnest phoenix
#

pls help

#

any(<Member>._roles.has(_id) for _id in role_ids) should work ig

hasty mulch
earnest phoenix
#

A sequence of the ids yes

hasty mulch
#

Kk

earnest phoenix
#

could be tuple, list or whatever

#

anyone know how to invite jafbot??

hasty mulch
earnest phoenix
#

Sure, why not

#

any() returns boolean, you can combine it with another condition

#

wait, you can't have and in the sequence, should be something like (some_id, some_other_id)

hasty mulch
#

Didn’t know I needed any

earnest phoenix
#

that's just basically equivalent to <Member>._roles.has(some_role_id) or <Member>._roles.has(some_other_role_id)

#

If you use all, it'll be an and instead of or

hasty mulch
#

Reeeeeee, now ya tell me

earnest phoenix
#

pls help me

#

how to connect VS Code And Heroku

#

So That We can see logs there

latent heron
#

teach heroku to become sentient and gain psychic powers

earnest phoenix
#
if(!message.member._roles.has(ROLE_ID))
return message.channel.send("You didnt have the role")```

Correct?
#

wha-

earnest phoenix
#

To use the command the member need role

earnest phoenix
dusky sundial
earnest phoenix
dusky sundial
#

Yeah, I got that. But why are you returning the method rather than just calling it?

earnest phoenix
craggy pine
dusky sundial
#

What difference does that make? upsidedown_thinking

#

If you want the bot to send a message, just do message.channel.send. No need to put return before it

earnest phoenix
#

Hmm Ok

#

I will send the full code wait

dusky sundial
#

If you don't understand why, I'd recommend learning some basic js before delving into bot development

earnest phoenix
#

They're probably returning because they don't want to process the command. But, the thing is, if this was d.js and I wasn't misinterpreting the source code, _roles should be the raw data, which is an array ig, does an array even have has method? Shouldn't it be includes or something? Not really familiar with js nor d.js so I might be wrong.

gilded swallow
#

_roles should be just roles iirc

#

as stated above, return is not needed in that instance

earnest phoenix
#

I mean, isn't it just the matter of style? Because it's either if return or if else

cinder patio
#

and why do you guys think return is not needed? He wants to stop the further execution of the command, because the user didn't have a role

#

Perfectly fine

earnest phoenix
#

right

forest iris
#

who has a good hosting service without github and repl.it

cinder patio
#

The problem is with _roles like norizon said, it's an array of role IDs

forest iris
#

bro. who has a good hosting service without repl.it or github

dusky sundial
#

Pinned messages has some good VPS services if that's what you're looking for

forest iris
#

im talking about free ones

rustic nova
#

there's no good free ones

dusky sundial
#

I've heard about Heroku. But like it also says in pins, most free hosting providers won't be any good in the long run. They work fine if you're just looking for a temporary host tho

rustic nova
#

read pins on why free hosts aren't the best idea

dusky sundial
#

There's a reason almost all hosts are paid

forest iris
#

what if I dont have enough money for that and they bill me

dusky sundial
#

They will probably shut your host down

forest iris
#

how do you self host

dusky sundial
#

By having your own device, like a computer or a raspberry pi that's on and running the bot 24/7

forest iris
#

whats a rasperry pi

dusky sundial
#

A popular single board computer

forest iris
#

please show me an image

dusky sundial
#

They're good for stuff like that since they are pretty cheap and consume almost no power

#

You can just google "Raspberry Pi" and it'll show you

forest iris
#

how do I get it to host my bot tho

dusky sundial
#

Just have it run your script

#

Self hosting is usually harder to set up though, and might not be as high performance as a paid host

forest iris
#

whats the average ping for it?

dusky sundial
#

Depends entirely on where you are relative to Discord's servers, as well as the actual hardware of the computer

#

When i self hosted from Sweden on a Raspberry Pi 3B+ i had like 100ms avg, when I swapped to a VPS in New york it went down to about 30

#

There are of course advantages to self hosting too, like having full control of everything that's going on. No need to rely on a hosting company

forest iris
#

what about polarbearhosting

dusky sundial
#

You can try it if you want to, but again, free hosts always have their drawbacks

#

It might be okay for a smaller bot, but if it grows you will have some issues

forest iris
#

its down right now

dusky sundial
#

Well, it's either going to be free or good. That's the harsh reality

opal plank
#

its the 3 horseman

#

if its good, its paid

#

if its free, its not good

#

if its free and good, you're the product

#

pick your poison

soft knot
#

hello i added my bot but it is waiting for a vote.

dusky sundial
#

Waiting for a vote?

#

Do you mean verification?

rustic nova
#

can take longer due to issues with the site

dusky sundial
soft knot
#

I understand who's taking care of these

soft knot
opal plank
dusky sundial
# soft knot yes

Like Hope said, you'll probably need to wait at least a week, likely longer than that

opal plank
#

so a lot of times, i feel more comfortable knowing theres a lot of ads

dusky sundial
#

Yeah, that's true. I heard a single e-mail address sells for like $90

soft knot
#

@opal plank

opal plank
#

?

#

@soft knot what?

soft knot
#

how did you do your situation

opal plank
#

my what?

soft knot
#

status

opal plank
soft knot
#

looks a little difficult

opal plank
#

why you think only a few did it?

soft knot
#

thanks anyway

rustic nova
#

premid has these buttons too now

#

depending on presence

gilded swallow
dusky sundial
#

That's only "free" if he's not the one paying the electrical bill tho ^^

opal plank
#

hence a rpi

#

Use a free shitty and limited host - heroku, glitch
Use a free but credit card required - aws, f1 micro
Use a cheap friendly host - RasberryPi
Use your pc as host
Buy a small VPS - DO, galaxy, etc
Kidnap someone's kid and bargain for a VPS lifetime
Ask a friend that already has a VPS themselves and are willing to let you use it

forest iris
#

@opal plank what about uptimerobot

earnest phoenix
#

on glitch? never do it

opal plank
#

against TOS

earnest phoenix
#

repl it maybe

opal plank
#

most free hosts ban uptimer bots to keep pinging your projects

earnest phoenix
#

repl it dont has that i think

#

you can get 3 month premium for free anyway

forest iris
#

Im just waiting on my approval on my bot :)

#

I call it: 6ball bot

#

took me like i think 1 hour

#

its just fun commands. not moderation

opal plank
#

you made a bot in 1 hour?

forest iris
#

i think so

opal plank
#

what language did you use?

forest iris
#

i loose track of time lol

forest iris
opal plank
#

interesting

forest iris
#

you know javascript?

opal plank
#

yup

#

javascript and typescript

#

im always helping here with both

#

thought at this point in time i moved away from discord.js, its a shit library

forest iris
#

whats typescript

opal plank
#

basically javascript, but better

forest iris
#

I use discord.js

opal plank
#

a LOT better

forest iris
#

is it similar?

opal plank
#

its the same basically, but with types

#

check this for a quick intro

forest iris
#

ok ok ok. i get it

opal plank
#

if it interests you, keep watching

wispy holly
#

hiring developers are illegal in this channel?

earnest phoenix
#

yea not here

cinder patio
#

not exactly illegal, but if you're searching for bot developers go to fiverr or upwork

pale vessel
#

@opal plank is it fine to abuse ! if I know that the message is from a guild

cinder patio
#

Not a fan

opal plank
#

though keep in mind, thats an easy way to create bugs

pale vessel
#

how would you handle it?

#

is this not enough?

cinder patio
#

It is

#

If you do a check beforehand then ts shouldn't be complaining

pale vessel
#

it's in a different file

cinder patio
#

Then it's fine

pale vessel
#

I see

opal plank
#

unless d.js is dumb enough not to have the types

#

detritus has it for sure

#

wink wink no sponsored but you should try it as a full fledged TS and GOOD library, rather than d.js's mess @pale vessel

opal plank
#

personal experience, a LOT better than d.js, by a mile

cinder patio
#

You really can't come in #development without telling someone to switch to a different lib, can you bloblul

opal plank
#

nope, i feel like its a sin not talking about such a good lib with peple trying ts

#

they just arent flourishing as much because nobody speaks about it

#

in every sense its better than d.js, and i mean it

#

it feels wrong to use it without giving an honest opinion about it when its this good

pale vessel
#

The only one that's holding me back is Berry

opal plank
#

frick berry

#

detritus ftw

earnest phoenix
#

lol i use discord py?

opal plank
#

lol i was mentioning that to flazepe?

gilded swallow
#

i code in assembly like a real man

spare portal
#

im trying to add a command that toggles the bot's responses to keywords said by users, if the admins want to disable that from happening. here's my code

if (msg.content.toLowerCase() === ",,togglekeywords") {
    switch(serverToggle) {
      case `${curServer}_on`:
        serverToggle = `${curServer}_off`;
        msg.channel.send(`keyword responses are turned off for ${msg.guild.name}`);
        break;
      case `${curServer}_off`:
        serverToggle = `${curServer}_on`;
        msg.channel.send(`keyword responses are turned on for ${msg.guild.name}`);
        break;
    }
}

where const curServer = msg.guild.id; and serverToggle = BT${curServer}_onBT (BT is a backtick)
everytime i use the command it keeps saying "keyword responses are turned off", and wont toggle back to on

#

the two variables are set right after client.on('message',async msg => {

#

but i don't know if that changes anything

earnest phoenix
#

Hey, I have a problem with my ready.js:

const Discord = require('discord.js');
const client = new Discord.Client();
const logsChannel = client.channels.cache.get('815953311614107709');

module.exports = (client) => {
  console.log('Synapse en live !');
  client.user.setActivity('s!help', { type: 'WATCHING' });
  
  client.on('guildCreate', (guild) => {
  console.log("Joined a new guild: " + guild.name);
const joinEmbed = new Discord.MessageEmbed()
    .setTitle(`Omg, je suis arrivé sur un nouveau serveur !`)
    .addField(`Serveur`, `${guild.name}`)
    .addField(`Fondateur`, `${guild.owner}`)
    .addField(`Nombre de membres`, `${guild.memberCount} membres`)
    .setFooter(`Je suis actuellement sur ${client.guilds.cache.size} serveurs !`)
    .setTimestamp()
    .setColor('GREEN')
    logsChannel.send(joinEmbed);
})




client.on('guildDelete', (guild) => {
  console.log("Left a guild: " + guild.name);
const leaveEmbed = new Discord.MessageEmbed()
    .setTitle(`Oh nan, je viens de quitter un serveur :/`)
    .addField(`Serveur`, `${guild.name}`)
    .addField(`Fondateur`, `${guild.owner}`)
    .addField(`Nombre de membres`, `${guild.memberCount} membres`)
    .setFooter(`Je suis actuellement sur ${client.guilds.cache.size} serveurs !`)
    .setTimestamp()
    .setColor('RED')
    logsChannel.send(leaveEmbed);
})
};
#

Error: Cannot read property 'send'

#

at logsChannel.send(joinEmbed);
and logsChannel.send(leaveEmbed);

lament rock
#

You have to wait for your client to enter the ready state before you can get items from the caches

crystal wigeon
#
setinterval(() => { timer = x + 10 }, timer)```
#

is this even correct?

lament rock
#

You cannot dynamically set the timer on an interval. You'd have to clear the interval and then re-set it

crystal wigeon
#

how?

#
setinterval(() => { clearinterval();
 timer = x + 10 }, timer)```
#

like this?

#

i mean yeah ik i have to assign the settimeout to a vari

#

to clear it

lament rock
#
clearInterval(intervalYouAssignedToAVariable);
intervalYouAssignedToAVariable = setInterval(() => doCode(), timer);
#

at that point, you should be using a Timeout.

crystal wigeon
#

yeah so, if i use a setTimeout

#

i can set the timer dynamically?

lament rock
#

no

#

the same logic above applies

#

instead, you have to use clearTimeout

slender thistle
#

No dynamic timers for either without clearing and re-creating them

crystal wigeon
#
                  var timeout = 1000 * 2
                  const time = setTimeout(async () => {
                        console.log({ timeout })
                        timeout = 1000 * 5
                  }, timeout);
cleartimeout(time)```
cinder patio
#
function createTimeout(timeout) {
  setTimeout(() => {
     // Code
     createTimeout(timeout + 1000);
  }, timeout);
}  

for example

crystal wigeon
#

ahh

cinder patio
#

you also want to have a condition which clears the timeout

crystal wigeon
#

this makes more sense

cinder patio
#

so it's not infinite

crystal wigeon
#

that was the missing part

lament rock
#

clear the timeout in the timeout callback. That code will clear the timeout immediately and never trigger

crystal wigeon
#

i mean, i want it to trigger for 2 secs the first time and then 5 secs untill some condition and i clear the interval after that condition is met, but the issue was the timer kept exec at 2sec and never changed to 5

crystal wigeon
earnest phoenix
#

Because I made when the bot is ready I have a message to the log and works

#

but if I wait 5 minutes, not works 😦

small tangle
#

Is there a performance difference between a scheduled trigger inside the mongoDB or executing a function with a timer?

cinder patio
#

That's because you access the caches before the ready event

#

and that code never runs again

earnest phoenix
#

oh

crystal wigeon
#

if (condition) // dont call createtimeout func and call clearTimeout()

cinder patio
small tangle
#

FeelsSmartMan oke ill give it a try

earnest phoenix
cinder patio
#

Yes because you always have access to the console, what does that have to do with sending a message to channel?

earnest phoenix
#

yes

#

oh euhh

#

when my bot joins a new server

#

I have informations to the server in a channel

#

in my server

dusky harness
#

const userID = '@dusky harness';
if (message.author.id !== userID) { return message.channel.send("Bunu yapamazsın.")
client.on('message', message => {
if (!message.guild) return;
if (message.content.startsWith('!kick')) {
const user = message.mentions.users.first();
if (user) {
const member = message.guild.member(user);
if (member) {
member
.kick('Optional reason that will display in the audit logs')
.then(() => {
message.reply(Üye başarıyla atıldı ${user.tag});
})
.catch(err => {
message.reply('Üyeyi atamadım');
console.error(err);
});
} else {
message.reply("Bu kullanıcı bu sunucuda değil!");
}
} else {
message.reply("Kullanıcı bulunamadı");
}
}
}
});

what's my fault

#

can you help me

#

@coral trellis @modern sable @spare goblet

coral trellis
#

We don't provide development support, please don't ping all of us. Help in this channel is provided voluntarily by members

dusky harness
#

will you help

#

Why is nobody helping

royal herald
#

what are u trying to do?

dusky sundial
#

Describing the error will also be helpful

royal herald
#

oh

#

i find it

#
if (message.author.id !== userID) { return message.channel.send("Bunu yapamazsın.") //message is not defined
```
#

so u need to do is:

client.on('message', message => {
const userID = '698183217215176783';
if (message.author.id !== userID) { return message.channel.send("you can to that")
}
//turkish botum kod
#

write your code under the //

dusky sundial
#

It looks like he did the <@!> thing, where it's supposed to be just the id

earnest phoenix
#

yes

dusky sundial
#

But like Ash mentioned, the main issue is that message isn't defined in the first if-statement

signal summit
#

Whats this in my bot's application Info?

INTERACTIONS ENDPOINT URL
You can optionally configure an interactions endpoint to receive interactions via HTTP POSTs rather than over Gateway with a bot user.
cinder patio
#

That's for slash commands

cinder patio
#

you can receive slash command events via a webhook

#

Ignore it if your bot doesn't use slash commands or if you listen for slash command event via the gateway

dusky sundial
signal summit
autumn girder
#

message.reply(cum)

pale vessel
cinder patio
#

😳

misty sigil
#

🐓

#

wait shit I mean 😳

native fulcrum
#

I have a question about the bot: reaction roles

#

It ask me for the message id but where can I find that

sharp torrent
native fulcrum
#

Ok

sharp torrent
exotic galleon
#

Do you know what are the background codes on the page of my bot on the top.gg site?

slender thistle
#

Do you mean CSS selectors for specific elements on your top.gg page?

exotic galleon
#

wait 1 minute

#

How can I change the background of this place? What are the codes?

zenith terrace
sullen vigil
#

how much time it will take to get my bot working on top.gg

umbral zealot
viscid gale
#

btw.. for different environments, the results vary WILDLY.. but does anyone know which one is REALLY faster?
check it out yourself

(async()=>{
  //waiter function for promises
  function waiter(r,j){r(1)}
  
  //await speed testing
  var d=new Date()
  for(let i=0;i<=999999;i++){await new Promise(waiter)}
  let awaitSpeed=new Date()-d
  console.log(`speed for await is ${awaitSpeed}ms`)
  
  //then speed testing
  let d1=new Date(); let i=0
  function _then(a){
    if(i==999999){
      let thenSpeed=new Date()-d1
      return console.log(`speed for then is ${thenSpeed}ms`)
    }
    new Promise(waiter).then(_then); i++
  }
  new Promise(waiter).then(_then)
})()
cinder patio
#

uhhh what are you testing exactly? await/async vs .then?

fluid basin
#

seems so

cinder patio
#

await seems to be way faster on chrome

fluid basin
#

also the second block of code might be not accurate in what it does (compared to the first one)

#

mutating variables out of the context asynchronously could cause race conditions

#

yeah

#

the code is wrong

umbral zealot
#

can confirm there's a whole lot of issues here, bad practices, and code problems.

lament rock
#

I was gonna say, the i mutation should be within the .then

fluid basin
#

thank

viscid gale
earnest phoenix
#

L M A O

#

L M A O

viscid gale
#

but the thing is it seems way slower on my version on node

earnest phoenix
#

L M A O

viscid gale
#

i do have a low version

#

bruuu wat so funny tho

cinder patio
#

People already pointed out that the test is flawed

modest maple
#

why do you even care about the performance of async/await anyway

#

its just a wrapper over the the promise system

viscid gale
#

so it's a sin to test?

#

bruh it is interesting to know tho

#

and how would I make the then loop to make it fair?

#

or should I make the await a recursing function?

fluid basin
#

use the variable in the waiter

modest maple
#

litterally why do you care

#

await is always going to be slower than a raw promise

#

but by a insignificant amount in the real world

#

making it a promise in the first place when the job is CPU bound is pointless anyway

viscid gale
fluid basin
#

await and then both have their advantages

#

depending on the situation

modest maple
# viscid gale so ur saying `then` is faster?

promised will ALWAYS be faster because async/await in JS is built ontop of them, not that it matters because the whole point of single threaded concurrency is mostly for IO where the time waiting for IO is going to be more than the cost of the promise in the first place

fluid basin
#

its actually about the same

modest maple
#

if your promise is just returning a random thing that cant be done asynchronously e.g. heavy compute tasks then theres no point them being promises

modest maple
fluid basin
#

no, like

modest maple
#

using one over the other just for 'performance' is pointless thinking_derp

fluid basin
#

well yes

river panther
#

anyone needs help from the best pron't bot programmer?

viscid gale
#

there is no way that doesn't sound arrogant so no?

river panther
#

what?

fluid basin
#

what I meant is that for a promise you are passing a reference for the v8 event loop to go to when the promise has completed, meanwhile async just points back to the line of code where the await call is at

river panther
#

i don't want to sound arragent

#

arrogant*

viscid gale
#

oh mb

modest maple
fluid basin
#

yea so its really about the same

modest maple
#

the overhead is litterally about the same as calling an extra function

fluid basin
#

well if you're worrying about async vs promise performance you might have bigger problems

viscid gale
#

lemme restate.. im doing this for fun people

fluid basin
#

smh ok

#

hope you found what you wanted

viscid gale
#

if i was asking a question id ask it straight and not beat around the bush

#

and i did cuz that WAS the question

viscid gale
fluid basin
#

they likely wont, unless you are doing something wrong

severe pike
#

Hiw long does it take nowadays for discord to verify a bots intents

#

Used to take ages

modest maple
#

still does

umbral zealot
#

months right now

#

they're way behind

severe pike
#

Fr

#

U kidding

#

Months

#

If i were to remove intents from my bot can it be added to more guilds

copper cradle
#

ye

severe pike
#

Might do that... this is stunting my growth aloot

modest maple
#

no?

severe pike
modest maple
#

you still cant grown beyond the limit with or without the intents before verification

umbral zealot
#

If you can work around the intents, yeah you should remove them

#

Most likely there's a permanent workaround too

severe pike
#

I hate this bot verification stuff pepowot

modest maple
#

should have just made a bunch of bots that could be verified before they introduced it and have a store of em mmLol

severe pike
#

I was two weeks late to early bot badge 😦

gilded swallow
severe pike
#

pepowot pepowot 😓

toxic jolt
#

shard gives 0 error, it stays like this when 26 shard should be opened.

#

guilds: 26k - users: 1.5m auto works too, what can i do?

#
const { ShardingManager } = require('discord.js');
const settings = require('./settings.json');
const manager = new ShardingManager('./bot.js', { token: settings.token });

manager.on('launch', shard => console.log(`Launched shard ${shard.id}`));
manager.spawn();
/*
manager.on("shardDisconnect", async (eventd, id) => {
    await manager.respawn(30000, 30000)
})*/``` its my shard.js
viscid gale
# fluid basin they likely wont, unless you are doing something wrong

um, about the thing I was talking about a bit earlier.. that thing that you said wont happen DID. then seems WAY FASTER than await so I guess this isn't fair either.. any more pointers to a fair comparison between the 2?

(async() => {
  //waiter function for promises
  function waiter(r, j) {
    r(1)
  }

  //await speed testing
  var d = new Date(); let i1 = 0
  async function awaiter(n){
    if(n){return await new Promise(waiter)}
    i1++ //because of how await works, I CANNOT put it as the last thing to do
    if(i1 == 999999){
      //because of that, I MUST make up for the one await outstanding
      await awaiter(1)
      let awaitSpeed = new Date() - d
      return console.log(`speed for await is ${awaitSpeed}ms`)
    }
    await new Promise(waiter)
    return awaiter()
  }
  await awaiter()
  
  //then speed testing
  let d1 = new Date()
  let i = 0
  
  function _then(a) {
    if (i == 999999) {
      let thenSpeed = new Date() - d1
      return console.log(`speed for then is ${thenSpeed}ms`)
    }
    new Promise(waiter).then(_then)
    i++
  }
  new Promise(waiter).then(_then)
})()
toxic jolt
#

yes

fierce ether
#
const fetchGuildData = await this.modules.guild.getValues(reaction.message.guild.id, [ "plugins.verification" ])``` how do i make this only return verification?
viscid gale
fierce ether
#

what?

viscid gale
#

making one edit lol

crimson vapor
viscid gale
crimson vapor
#
const fetchGuildData = (await this.modules.guild.getValues(reaction.message.guild.id, [ "plugins.verification" ])).plugins.verification```
viscid gale
#

;-;

#

both work.. one has an extra pair of brackets shrugs

viscid gale
crimson vapor
#

hmm

#

on vsc it auto fixes to the extra ()

#

it also gives intellisense

merry birch
#

i need some developer for an airport in roblox

slender thistle
toxic jolt
#

help pls

quartz kindle
#

shard 0 took too long

toxic jolt
quartz kindle
#

use client.on("debug", console.log) to see what is taking so long

toxic jolt
#

okay wait please

#

oh okay i connected in vds

#

what its a working

#

now

quartz kindle
#

you got connection issues

toxic jolt
#

why

quartz kindle
#

increase the spawn timeout to wait longer

toxic jolt
#

i how to fix this problem

quartz kindle
#

.spawn("auto", 5500, 60000)

toxic jolt
#

omggg

#

i love you thankss

#

you are best!!!!

quartz kindle
toxic jolt
#

I also want to ask something, node.js uses a lot of ram and cpu, how can I fix it?

#

im using discord.js v12

crimson vapor
#

ues discord.js-light and properly configure it to your needs in order to reduce the memory usage

#

the cpu usage will be higher assuming you do all you can as thats the nature of compression

toxic jolt
crimson vapor
#

install it and change the base client to discord.js-light

toxic jolt
#

i saw some code giving undefined error

crimson vapor
#

then you havn't properly configured it

toxic jolt
#

e.g: get role

toxic jolt
crimson vapor
#

cache the roles

toxic jolt
#

client.on("debug", console.log) Would it be a problem if I set this as a webhook?

#

I want to print to a channel

crimson vapor
#

it wouldn't be an issue but its not really a good idea to spam heartbeat logs to a channel

toxic jolt
#

sensible +1

#

@crimson vapor @quartz kindle thanks so much for helping guys love you <3

green kestrel
#
echo is_numeric((bool)true) ?  1 : 0;

Output: 0

PHP - you weird!

crimson vapor
#

what the fuck

cinder patio
#

I mean true isn't numeric

toxic jolt
#
console.log(`Launched shard ${shard.id}`)```I have one last question, how can I write how many shards to start here?
cinder patio
#

I don't see anything wrong

green kestrel
#

generally in most languages true == 1

toxic jolt
#

e.g: Launched shard 1/26

green kestrel
#

and it'll coerce

#

so is_numeric("1") == true

crimson vapor
river panther
#

me*

crimson vapor
#

idk much about djs sharding

cinder patio
#

But you're typecasting it as a bool so maybe then it doesn't coerce

toxic jolt
green kestrel
#

@toxic jolt you need 26 shards? 😮

crimson vapor
#

22k guilds

green kestrel
#

nice

#

congrats on that 🙂

toxic jolt
#

UwU thanks

#

2 years ago, when I was on 10 guilds, I used to say impossible ....

river panther
green kestrel
#

@toxic jolt i dont know much about discord.js but i know a lot about sharding in general, what was the question again

#

ah i see

crimson vapor
#

realistically without a guild or anything to identify, there is no way to get shard id iirc

green kestrel
#

there wont be an array of shards to count, as iirc djs sharding is one shard per process

crimson vapor
#

unless they use internal sharding

high bobcat
#

shard.spawn(shard.totalShards, 3000)

crimson vapor
#

use 5000

#

not 3000

green kestrel
#

cant you read shard.totalShards from within a shard, only in shard manager?

#

if you could, you could do:

console.log(`Launched shard ${shard.id}/${shard.totalShards}`);```
high bobcat
#

why 5 sec

crimson vapor
#

discord limits you to 1 shard connection every 5 seconds

green kestrel
#

because thats the rate limit for shard identify

crimson vapor
#

djs should be setting it at default 5000

green kestrel
#

when i boot all my clusters, each cluster has a 5 sec delay between shards, and each cluster has a 60 sec delay to the next cluster... i really dont want to get rate limited

high bobcat
#

so what is optimal sec

green kestrel
#

5000ms

high bobcat
#

so much 5

green kestrel
#

any less, youll get into issues, perhaps a token reset