#development

1 messages · Page 1310 of 1

earnest phoenix
#

@tawdry heart Do you have the invite link for the bot?

solemn leaf
#

Is there like a video tot on how to add a bot to dbl

tawdry heart
#

yes @earnest phoenix

blissful coral
#

Sorry, misunderstood your question. <3

earnest phoenix
#

visit the invite link

#

there should be a dropdown button saying Select a server

#

Select yours

#

Then click authorize

#

Ater you finish the captcha the bot will be in your server

tawdry heart
#

@earnest phoenix Yes, I did all this, but I have an offline

earnest phoenix
#

The bot is not offline means you can't use it

tawdry heart
#

why

#

@earnest phoenix

south cove
#

hey anyone here discordpy? I need some help with reactions

#

code:


    H = "✅"
    S = "❌"
    
    await message.add_reaction(H) #:regional_indicator_h:
    await message.add_reaction(S) #:regional_indicator_s:

    def check(reaction, user):
        return (user == ctx.message.author and str(reaction.emoji) == H or S)
    try:
          reaction, user = await client.wait_for("reaction_add", timeout = 30.0, check = check)
    except asyncio.TimeoutError:
        print("Timeout")
        
    if str(reaction.emoji) == H:
        await ctx.send("HIT")
    if str(reaction.emoji) == S:
        await ctx.send("STAND")```
#

whenever i execute this

#

it automatically prints "STAND" before i press anything

#

any help is appreciated

blissful coral
#

Are you filtering out the bots message

pale vessel
#

it's waiting for a reaction

#

and the bot reacted before it's collecting reactions

earnest phoenix
#

@tawdry heart how would you use an OFFLINE bot

#

think about it

#

the bot needs to be online so it can chat with other users

south cove
#

and the bot reacted before it's collecting reactions
@pale vessel okay i get it but how would i go about doing this

#

should sleep between the if and reaction using asyncio.sleep?

pale vessel
#

i was talking to extreme

south cove
#

oh

pale vessel
#

await should do (which is what you're already doing), i think

#

so i'm not sure

#

i'm not a python user

blissful coral
#

How do I start my sharding file when I do client.login()

solemn leaf
#

Im new to sharding can you help em with the same thing ^

#

lmao

manic osprey
#

@blissful coral client.login?

blissful coral
#

Yeah

solemn leaf
manic osprey
#

@pale vessel do not use

#

but

#

thats is v11

#

it is false

solemn leaf
#

waht\

blissful coral
#

Hm

solemn leaf
#

the guide we reading

blissful coral
#

djs guide playin tricks

#

on me

solemn leaf
#

is v11

manic osprey
#

give moment..

blissful coral
#

🤔

solemn leaf
#

its v12

#
const { ShardingManager } = require('discord.js');
const manager = new ShardingManager('./bot.js', { token: 'your-token-goes-here' });

manager.on('shardCreate', shard => console.log(`Launched shard ${shard.id}`));
manager.spawn();
#

im looking at the git rn

#

this is 11v

#
const { ShardingManager } = require('discord.js');
const manager = new ShardingManager('./bot.js', { token: 'your-token-goes-here' });

manager.on('launch', shard => console.log(`Launched shard ${shard.id}`));
manager.spawn();
manic osprey
#

@blissful coral new Discord.ShardingManager(file,options);

solemn leaf
#

yeah we need that

blissful coral
#

I see it

#

You run the shard file instead of the bot file

solemn leaf
#

Yeah

dreamy frost
#

Hello

blissful coral
#

Hi

solemn leaf
#

and the shard starts the bot?

blissful coral
#

Yes

solemn leaf
#

lets do it

blissful coral
#

Already done

#

lol

manic osprey
#

@blissful coral I know Discord.JS and writting from documentary paper

#

xD

solemn leaf
#

😓

manic osprey
#

@solemn leaf send ebmed

#

and after error and show log result

solemn leaf
#

ok

#

it went this time

blissful coral
#

Thanks @manic osprey <3

solemn leaf
#

now

#

how can we edit the shards

#

and that stuff

manic osprey
#

@blissful coral why you file have 200 many JS?

#

bad..

blissful coral
#

?

manic osprey
#

im writting file

#

and 10.000 lines code from 1 fles

blissful coral
#

I confused

solemn leaf
#

@blissful coral can you edit the table

#

to like

blissful coral
#

Yeah

#

Why

solemn leaf
#

I kinda want like shards on it too

blissful coral
#
client.user.setActivity(`${client.users.cache.size} Users! ${client.shard.id}`, {type: "WATCHING"})
#

Shouldn't this show shard?

#

@solemn leaf Sharding is in a different file...

#

So

solemn leaf
#

Yeah

#

and

blissful coral
#

I not gon try thattn

#

Maybe tmrw

solemn leaf
#

.

blissful coral
#

Thought so

solemn leaf
#

you funny

blissful coral
#

What

solemn leaf
#

client.shard

#

@blissful coral

blissful coral
#

ummmmmmmmmmmmmmmmmmmmmmmmmmmmmm

solemn leaf
#

lmaooo

blissful coral
#

I just went from 5k to 200...

solemn leaf
#

poor you

blissful coral
#

Is that because of intents?

solemn leaf
#

hold up

#

is it only the users on 1 shard

muted bramble
#

Yea

solemn leaf
blissful coral
#

It isn't sharding

#

I haven't enabled sharding

#

on my main bot

#

just my testing bot

muted bramble
#

How many shards do you have?

solemn leaf
#

1

blissful coral
#

None

#

On this bot

#

But I just lost 4.8k from my count

solemn leaf
#

eval it

muted bramble
#

Did you use auto shards method?

solemn leaf
#

yeah

muted bramble
#

Hm...

solemn leaf
#

I don't know how not too rn

manic osprey
#

i know it shard method

#

xD

#

but .. API decline from it.

blissful coral
#

Ok.

muted bramble
#

Well I have used that once on my testing bot.
I never used sharding on my main bot lol

manic osprey
#

you can need after

muted bramble
#

Yea

blissful coral
#

Do intents have anything to do with member counts of a guild??

manic osprey
#

yes i have unlocked.

solemn leaf
muted bramble
#

What 15

solemn leaf
#

when was it in 15 servers

#

wtf

blissful coral
#

@manic osprey which intent is it

manic osprey
#

from api

solemn leaf
#

oh

blissful coral
#

GUILD_MEMBERS?

manic osprey
#

developer

#

yes

blissful coral
#

thx

solemn leaf
#

What is server members for

blissful coral
#

Does it take a second?

muted bramble
#

Go and enable

solemn leaf
#

is it for like membercount

blissful coral
#

To enable?

#

Totally didn't enable it on my main bot and not my test bot...

#

LMAO

muted bramble
#

Lol

lucid prawn
#

what did this mean UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'permissionsFor' of null

surreal forge
#

i cant vote on dbl for bots on mobile bug?

manic osprey
#

@blissful coral thats is after

blissful coral
#

Yeah

muted bramble
#

What mobile bug? @surreal forge

surreal forge
#

i cant vote on mobile

#

for a bot

lucid prawn
#

What did this mean UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'permissionsFor' of null

muted bramble
#

I think it is not permissionsFor

#

Let me check

lucid prawn
#

check what

pale vessel
#

show your code

lucid prawn
#

ok

muted bramble
#

Do you want to check permissions for role or user? @lucid prawn

lucid prawn
#

both

#

@muted bramble

gilded plankBOT
mild flower
#

how do i make this kind of thing that it detects which ppl had reacted to the message with the reaction and choose a random person from them?

#

@ me if you have an answer

blissful coral
#

Wtf my member count Is at 58 now

#

I checked it is at 5k

#

client.users.cache.size

solemn leaf
#

rip lol

lucid prawn
#

ugh

vale garden
#

hi

#

this isnt bot related but can someone help me

#
//js
 function addTask() {
        if (i == 1) {
        document.getElementById('task').innerHTML = document.getElementById('input').value; i++
        document.getElementById('cancelid').className = 'cancelshow';
        }
//css
.cancel {
     display: hidden;
    }

    .cancelshow {
    text-align: left;
     color: azure;
     display: inline;
    }
//html
 <h1 id="top"> Memo </h1>

    <div id="division"> 

    <button class="cancel" id="cancelid" display="hidden"></button> <p id="task"></p>
#

for some reason the button #cancelid shows up even tho its supposed to be hidden

#

help

#

lol

lucid prawn
#

here we go again

vale garden
#

lol

solemn leaf
#

@blissful coral

#

dms

lucid prawn
#

Dm help

#

😦

cinder patio
#

@vale garden There's no "display" attribute on any html element as far as I know.

#

You'll have to do style="display: none"

lucid prawn
#

good job google

cinder patio
#

And also there's no display: hidden in css, there's visibility: hidden

#

Use none instead

solemn leaf
#

display: none;

cinder patio
#

No need for the important

solemn leaf
#

what is important for then?

vale garden
#

kk

#

i saw that on

#

stack overflow

#

lol

solemn leaf
#

its common css

lucid prawn
#

common

cinder patio
#

if you mark it with !important it will override all other classes

solemn leaf
#

@cinder patio thank

#

now to do that to my background stuff correct?

lucid prawn
#

What is that @solemn leaf

cinder patio
#

It looks good to me, unless you want it to look differently

solemn leaf
#

I mean I need help on my commands page

cinder patio
#

ah

solemn leaf
lucid prawn
#

how do u make that aki

solemn leaf
#

wydm

lucid prawn
#

how did u make the website

solemn leaf
#

idk how i did it

#

i just pooped it out

lucid prawn
#

Omg your so immature

solemn leaf
#

cool its 1am

lucid prawn
#

its 7 am

solemn leaf
#

it thing = timezones retard

earnest phoenix
#

@solemn leaf how old are u

lucid prawn
#

hes 5

earnest phoenix
#

So rude

lucid prawn
#

hes rude

solemn leaf
#

Only rude bcs it 1am

#

and i'm tried

lucid prawn
#

its 7am I'm tried as f

mild flower
#

TypeError: Discord.MessageEmbed is not a constructor

#

ahhh

solemn leaf
#

code

mild flower
#

ight

#

its not allowing me to put an embed here

solemn leaf
#

Why requiring twice

#

and alot of this stuff isnt right

mild flower
#

bruh i found the problem

pale vessel
mild flower
#

me being derp again

pale vessel
#

no shit

#

sorry

mild flower
#

sometimes, my genius, its equal to that of a potato

pale vessel
#

but a potato could be delicious

mild flower
#

true

pale vessel
#

so when you make a mistake, you can learn from it

solemn leaf
mild flower
#

lol

#

what is this

solemn leaf
#
const Discord = require('weather-js');
const weather = require('weather-js');

module.exports = {
    name: 'weather',
    description: 'Get the weather of any location',
    execute(message, args){
        if (!message.guild.me.hasPermission("SEND_MESSAGES")) return  message.author.send('Please give me permissions to send messages.');

            const Eweather = new Discord.MessageEmbed()
              .setTitle('Weather')
              .setDescription('**Usage** : ``;weather [location name/zip code]``')
              .setColor("RED")
mild flower
#

look at the first line

#

i fixed it from that

solemn leaf
#

just try again?

#

whats your dsicord.js version

pale vessel
#

they fixed it

solemn leaf
#

oh

#

does it work now?

earnest phoenix
#

Hey guys.. I was wondering is there some github repo that shows a clustered github bot

solemn leaf
earnest phoenix
#

That's sharding not clustering

solemn leaf
#

it might have clustering on it lmao

earnest phoenix
#

doesnt

solemn leaf
#

hmm

#

Ive been searching too.

earnest phoenix
#

No point in linking Bastion it's obfuscated

#

Anyone who understands clustering.. do I login into my bot in the master only or master & workers

mild flower
#

my hyperlink is not working

fickle sapphire
mild flower
#

TypeError: ["Click here"] is not a function

solemn leaf
#

b

mild flower
#

.setDescription(['Click here']('https://urmom.com'))

fickle sapphire
mild flower
#

oh

#

lmao

nocturne grove
#

Hey, quick question. Is your DBL token accesible by dbl.token, where dbl is made using new DBL()?

lucid prawn
unreal zinc
#

Guys, I just got a notification that my bot had reached a servercount of 75, and I filled in the verification form, but it says unorganic growth.
Is it a common thing that bots that get put in here are serverjoin spammed? If so, why?

earnest phoenix
#

That warning means your bot was invited to many guilds with the same owner

carmine summit
#

I have a loop, there is also an API with multiple pages eg. ?page=0
Is it faster to loop and collaect all the data of all the pages first then run the code, or is it faster to run codes after each page?

pure lion
#

Why use a page param?

#

An API should return everything requested

earnest phoenix
unreal zinc
#

That warning means your bot was invited to many guilds with the same owner
@earnest phoenix but is it common that ppl in this server do that? Because I think there is no way to get him verified ever again, even if he does only join legitimate servers

carmine summit
#

yes but there is average 46 pages

nocturne grove
#

thanks. Just figured it out myself tho but still wasn't sure

pure lion
#

Cwick, what is this API for?

earnest phoenix
#

@unreal zinc You can verify your bot again, just make it leave the servers that has the exact same owner

carmine summit
#

search

earnest phoenix
#

Reach 75 guilds then try again

carmine summit
#

searching something

pure lion
#

What platform?

carmine summit
#

JS

#

JSON

pure lion
#

Like Google

carmine summit
#

Why do you need it?

pure lion
#

Would you need the first 46 pages

#

All 46

earnest phoenix
#

How many pages this shit has

carmine summit
#

no

pure lion
#

Then get the first

carmine summit
#

the average is 46 pags

#

overall

pure lion
#

Or first 10

#

Whatever you need to use it for

earnest phoenix
#

That could be api abuse but there's something you can do if you didn't know, request them one by one every 30 seconds or something

#

To prevent api abuse

pure lion
#

Don't recommend automating an API thingy

earnest phoenix
#

Automating an api?

carmine summit
#

not automate

#

how do I assign a variable name by a variable's value

#
let i = 1;
(i)content = 'foo'
console.log(1content)
//must return foo
misty sigil
#

The XY problem is a communication problem encountered in help desk and similar situations in which the person asking for help obscures the real issue, (X), because instead of asking directly about issue X, they ask how to solve a secondary issue, Y, which they believe will all...

lost stone
#

hey

#

how can i Launch PowerShell as an administrator.

pale vessel
#

right click and select run as administrator

lost stone
#

right click on what

#

i use vs code

earnest phoenix
#

@lost stone right-click on the powershell icon

#

btw you can't run admin stuff through programs

#

you gotta do it manually

lost stone
misty sigil
#

no

#

the powershell icon

lost stone
#

this is right click on vsc

#

whereee

misty sigil
#

search it in the start menu

lost stone
#

i dont even know what is powershell

earnest phoenix
#

i dont even know what is powershell
@lost stone basically command prompt but butter
(not a typo)

lost stone
silver lintel
#

If i have string "blah blah ${thing}", is there a way to turn it into `blah blah ${thing}`

cinder patio
#

What's the difference?

silver lintel
#

Like message.channel.send("blah blah ${thing}"); and message.channel.send(`blah blah ${thing}`)

cinder patio
#

The string is the same, the only difference is the quotes you are using. If you use the " quotes, the bot will literally send blah blah ${thing} while if you use the ``` quotes, "thing" will replaced with whatever the variable is holding

pale vessel
#

or do you mean thing is foo and you want to turn "test ${thing}" to "test foo"?

silver lintel
#

yes

pale vessel
#

eval xd

#

not recommended

silver lintel
#

guess i should use some sort of indexOf?

pale vessel
#

indexOf?

silver lintel
#

string.indexOf("<thing>");

#

or smth

cinder patio
#

You can use replace

silver lintel
#

oh yes

#

im dumb thanks

rigid hull
#
const serverQueue = message.client.queue.get(message.guild.id);
        const songInfo = await ytdl.getInfo(args[0].replace(/<(.+)>/g, '$1'));
        const song = {
            id: songInfo.videoDetails.video_id,
            title: Util.escapeMarkdown(songInfo.videoDetails.title),
            url: songInfo.videoDetails.video_url
        };
``` I get (node:4) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'get' of undefined
silver lintel
#

is there any difference between .replace() and regex?

tired panther
#

yes

toxic jolt
#

OMGGGGG

#

DISCORD.JS

#

YOU ARE FUCKIII

#

omg im so triggered

rigid hull
#

why?

toxic jolt
#
client.on("channelCreate", async (kanl, member, guild) => {
  let kanal = await db.fetch(`kanalk_${kanl.guild.id}`);
   if (kanl.id == kanl.guild.owner.id) return;
  if (kanal == "acik") {
    kanl.delete();
    const embed = new Discord.RichEmbed()
      .setDescription(
        "Sunucunuzda yeni bir kanal oluşturuludu. Saldırı şüphesiyle geri silindi! \n **Bu sistemi kapatmak için sunucunuza girip bunu yazın:** !!kanal-koruma kapat"
      )
      .setColor("BLACK");
    kanl.guild.owner.send(embed);
    return;
  } else {
    return;
  }
});```im make it this code but 
Someone came to me and said all channels on the server were deleted
#

WHAT IS THIS???

#

ITS A IMPOSSIBLE

misty sigil
#

a token leak

#

its a token leak mate

toxic jolt
#

I HOW TO FIX

#

THIS FUCKING SHIT

#

IM DONE!

misty sigil
#

by regenerating your fucking token

toxic jolt
#

I DELETE MY BOT

misty sigil
#

ok

pale vessel
rigid hull
#

@toxic jolt dm pls

misty sigil
#

and this is why you dont be stupid with your token, kids

cinder patio
#

🤦

toxic jolt
#

Discord.js is faulty

misty sigil
#

no

#

it was a token leak

#

theres no way that the code you gave us would do that

toxic jolt
#

I renew tokens every day?

misty sigil
#

still could've been leaked

#

there is no way that the code there is gonna do that

toxic jolt
#

what ?

misty sigil
#

oh wait

toxic jolt
#

A code like this used to ban hundreds of people

misty sigil
#

im an idiot

#

look at the code

#

kanl.delete();

#

let me guess

#

you literally just copy pasted that

#

into your bot

toxic jolt
#

Code like this has banned hundreds of people (5 weeks ago)

misty sigil
#

i think you're just an idiot

toxic jolt
#

in so many bug's

misty sigil
#

don't put random code into your bot

toxic jolt
#

I don't use random code

#

This code from 2018

#

Was updating

#

for me

#

:c

misty sigil
#

it must be random code if you just put delete() in there

toxic jolt
#

I know but this code shouldn't work

#

It's a bug!

misty sigil
#

it isnt a bug

#

it literally fucking does what you told it to

toxic jolt
#

"That's what happened on my friend's server" deleting all channels.

#

I am done

cinder patio
toxic jolt
#

Automatic deletion if the channel opens

misty sigil
#

well

#

no

toxic jolt
#

I am bored for discord.js

misty sigil
#

no you're just being dumb

toxic jolt
#

why :c

misty sigil
#

what did you think channel.delete would do?

toxic jolt
#

For automatic deletion if the channel is created.

#

for one channel.

#

NO ALL CHANNEL

#

ITS A FUCKING IMPOSSIBLE

misty sigil
#

yea

#

but how are you gonna determine if that channel is wanted to be deleted

toxic jolt
#

I'm so angry for discord.js

misty sigil
#

no

#

thats like physically impossible

#

to do

toxic jolt
#

look this

#
client.on("channelCreate", async (kanl, member, guild) => {
  let kanal = await db.fetch(`kanalk_${kanl.guild.id}`);
   if (kanl.id == kanl.guild.owner.id) return;
  if (kanal == "true") {```
misty sigil
#

well

earnest phoenix
#

Does anyone have tips on how to decrease a bot’s ping?

misty sigil
#

that just does it if thats true

#

@earnest phoenix move it as far away from discord as possible

toxic jolt
#

OMGGGGGGGGGGGGGGGGGGGGGG

#

shiiit

earnest phoenix
#

i mean decrease

toxic jolt
misty sigil
#

move it closer to discord

toxic jolt
#

What am I going to do

#

I am done....

#

2 person's server was deleted all channels...

#

I don't know what happened in other servers yet

#

What will I do! :c

earnest phoenix
#

@toxic jolt turn off your bot

#

regenerate tolen

boreal iron
#

Contacting the nsa. I’m sure they have a copy of each conversation and channel

earnest phoenix
#

don't get it online again until you fix all bugs

#

@toxic jolt bruh

#

wait, discord.js’ RichEmbeds are still a thing?

#

wait, discord.js’ RichEmbeds are still a thing?
@earnest phoenix They are just renamed to MessageEmbeds in v12

cinder patio
#

He must be using an older version

misty sigil
#

@toxic jolt this is why you test on a test bot

#

in a test server

pale vessel
#

wait, discord.js’ RichEmbeds are still a thing?
@earnest phoenix i thought you use eris

earnest phoenix
#

i do

#

just asking cuz that person just used RichEmbed

#

how do i install ffmpeg on windows 7?

boreal iron
#

Download the codex and install it.

earnest phoenix
#

that dont help

#

there should be a lot of useful resources regarding how to install it on the internet

#

yes but i cant find the right download link

boreal iron
#

Than it’s probably not mpeg you need.

earnest phoenix
#

oh you mean the download link

boreal iron
#

Sure... asked Google and I got the right URL as first result

earnest phoenix
#

ok

#

maybe you are not searching with the right keywords if its not showing up tbh

#

well after i downloaded it now what?

#

Install it

#

move it to your C: directory or something?

#

its a zip file

#

i extracted it to C and now what?

#

extract it

#

@earnest phoenix did you try following the instructions on their website?

#

instructions? where?

#

Literally every single project on the web has instructions on their site for using it

boreal iron
#

Called documentation in this case

earnest phoenix
#

hope this does not count as spoon feeding

toxic jolt
#

what the

#
client.on('guildCreate', guild => {
console.log('Bot Eklendi: ' + guild.name + ' ID: ' + guild.id)
// bot added log
})```
earnest phoenix
#

Does high ping have anything to do with bad code? cuz my old commands run slower than recently written ones

toxic jolt
#

LOOK A THIS

#

ITS A

#

BUG

earnest phoenix
#

it isnt

pearl trail
tropic basin
#

Hi, sorry to disturb! I'm trying to use the broadcastEval() function in place of client.guilds.cache.get since it no longer works if the guild is in a different shard it seems but i cant seem to understand how the script should look like as a parameter.

Any help would be appreciated! DK_bow

earnest phoenix
#

discord.js adds in every guild and emits the guildCreate event for every new guild on start

#

iirc

toxic jolt
pearl trail
#

lmaoaoaoao

toxic jolt
#

lol nice

#

discord.js

#

i dont like it

#

i find a so many bug

earnest phoenix
#

rip pc

silver lintel
#

its not discord.js's fault

earnest phoenix
#

btw if your bot is in a lot of servers, its probably not a bug

pearl trail
#

what the
@toxic jolt is that mean the bot will show all guilds that your bot in?

earnest phoenix
#

winserver NotLikeThis

boreal iron
#

Does high ping have anything to do with bad code? cuz my old commands run slower than recently written ones
@earnest phoenix Nope. It’s a result of a „bad“ connection to the Discord gateway.

toxic jolt
#

@toxic jolt is that mean the bot will show all guilds that your bot in?
@pearl trail no

boreal iron
#

What do mean with „high“ btw?

toxic jolt
#

bot added guild show

pearl trail
toxic jolt
#

omg i how to report bugs

#

i using discord.js v11

earnest phoenix
#

you'll have to update to v12

toxic jolt
#

How can I quickly and safely update to v12 in my bot

earnest phoenix
#

What do mean with „high“ btw?
@boreal iron the bot takes approximately 250ms for it to reach the command handler then execute the command

#

v11 is not supported anymore due to intents update and new gateway versioning (and the domain change)

toxic jolt
#

please help

#

How can I quickly and safely update to v12 in my bot

pearl trail
#

backup your code, do npm i discord.js, uh i forgot

#

npm update?

toxic jolt
#

i update all discord.js v11 code's

pearl trail
#

Thonk nvm i'm noob in js

toxic jolt
#

to v12

earnest phoenix
#

Just update to discord.js v12 build and update your code according to the changes on the documents

toxic jolt
#

okay but so many changing code in v12

earnest phoenix
#

No

pearl trail
#

well, discord.js v12 has so many code updates

earnest phoenix
#

is a backup relevant for a v12 update?

toxic jolt
#

my bot is 2 years old!

earnest phoenix
#

i mean updating technically doesn’t affect your currently existing code iirc

#

There's just about 9 changes or a little more in total in d.js v12

toxic jolt
#

There's just about 9 changes or a little more in total in d.js v12
@earnest phoenix 3K LINE IN BOT.JS

boreal iron
#

Oh okay that’s a different story @earnest phoenix
Writing it like this it is possible your code can cause the delay.
Are there a lot of loops in your code for example?

earnest phoenix
#

Bro my bot is 9k lines

toxic jolt
#

BRO WATCH THIS

#

look

earnest phoenix
#

ok

#

nobody cares

#

my bot has 100+ files and most of them have at least 100 lines

#

you were given an instruction on how to fix it

toxic jolt
#

MY BOT HAS 400+ FILES

#

im dead.

earnest phoenix
#

wait did you create a file for every event or command which caused you to have 400+ files?

#

Oh okay that’s a different story @earnest phoenix
Writing it like this it is possible your code can cause the delay.
Are there a lot of loops in your code for example?
@boreal iron there’s no loops but my bot runs 30 required if statements before actually moving onto the command

boreal iron
#

my bot has 100+ files and most of them have at least 100 lines
@earnest phoenix You should try to start a microtimer at the beginning of your script and one at the end and calculate and log the script time.

earnest phoenix
#

i think the ping is most likely caused by the processes

boreal iron
#

Hmm just try the timer and see how long you script needs to run through anyway.

#

Just a few lines of code...

earnest phoenix
#

100ms

solemn jolt
#

Disconnected from log stream. There may be events happening that you do not see here! Attempting to reconnect...Connection to log stream failed. Please try again later.

earnest phoenix
#

somewhere at there

solemn jolt
#

What's this?

earnest phoenix
#

finnaly i installed it

#

finnaly i installed it
congrats

pearl trail
#

when i use my wifi to host my bot, it has 500-2000 ping ;-;

earnest phoenix
#

yay

#

sad

#

Please avoid self hosting as much as possible

pearl trail
#

oh

boreal iron
#

Well 250 - 100 = 150ms which is okay in my mind

pearl trail
#

we can't send it here?

earnest phoenix
#

Send what

rigid hull
#

I look to discord.js website, and it is all .blablabla....etc. this part is OK, so now, my question is, How can i know what I am going to write next while coding, like, for example, message.channel.send, this is a common thing, but how do i know the others.

pearl trail
#

ah, it counted as spam

earnest phoenix
#

It didn't

#

It included a invite link

#

@rigid hull consult with docs or switch to TS and use typed code

#

Or something luca catched with some regex

pearl trail
#

AAA YES I SEE, there's a link

#

shard

rigid hull
#

@rigid hull consult with docs or switch to TS and use typed code
@earnest phoenix TS ?

pearl trail
#

[WS => Shard 0] [CONNECTED] <actually there is a link here ;-;> in 2726ms
[WS => Shard 0] Clearing the HELLO timeout.
[WS => Shard 0] Setting a heartbeat interval for 41250ms.
[WS => Shard 0] [IDENTIFY] Shard 0/1
[WS => Shard 0] [READY] Session 15ab4673d25d7a4669b9c9278187deaf.
[WS => Shard 0] [ReadyHeartbeat] Sending a heartbeat.
[WS => Shard 0] Shard received all its guilds. Marking as fully ready.
Cat Chan ready!, 3 servers, 32 members, 112 channels
[WS => Shard 0] Heartbeat acknowledged, latency of 6396ms.

#

41250ms

earnest phoenix
#

That's what happens when Self hostum

pearl trail
#

yes lmao

earnest phoenix
#

TS ?
typescript

#

Self-hosting is only good if you're testing something and have nowhere else to test it

rigid hull
#

oh

#

thx

#

will look

earnest phoenix
honest perch
#

press the delete button

earnest phoenix
#

where this button

serene lava
#

i need bot client i

#

d

earnest phoenix
#

oh indian

serene lava
#

yes

earnest phoenix
#

press the delete button
@honest perch where is button

#

?????

rose warren
earnest phoenix
boreal iron
#

That's sad, Mac.

#

Now we probably lost somebody to make fun of. notlikenoot

rocky hearth
#

Can I combine 2gb ddr2 ram with 4gb ddr4 ram?

earnest phoenix
#

wat

split hazel
#

fuse then together

boreal iron
#

This will throw a memory error and your PC wont boot

earnest phoenix
#

every iteration of DDR has different slots

#

lol

boreal iron
#

oh ddr2 uhh

#

that still exists lol

split hazel
#

what's even the difference between different ddrs

cinder sandal
#

combine ddr2 and ddr2 together and you will get ddr4

#

/s

split hazel
#

i assume higher is better

boreal iron
#

lol

earnest phoenix
#

different slots, operating voltage and frequency

#

there's more internally but that's the base difference

split hazel
#

so older probably use more power

cinder sandal
#

i have ddr4

#

the newest

#

oh wait

#

there's ddr5

split hazel
#

ddr6 when

boreal iron
#

also ddr6

split hazel
#

bruh

boreal iron
#

but not for costumer PCs

earnest phoenix
#

^

cinder sandal
#

ddr69 when

boreal iron
#

I would assume never

earnest phoenix
#

i'm pretty sure the ps5 is running on ddr6

split hazel
#

who even manufacturers the different ddr versions

#

or is it global

boreal iron
#

thought it's hbm memory, not ddr6

#

not sure about that tho

earnest phoenix
#

we'll see when it launches

boreal iron
#

who even manufacturers the different ddr versions china who else, lel

earnest phoenix
#

the entire console is witchcraft

boreal iron
#

any tec being crafted in china

split hazel
#

yeah but is there a base company that produces new ddr versions

boreal iron
#

oh no, I think it's an industrial standard

earnest phoenix
#

i'm guessing IBM cause of the standard yeah

boreal iron
#

not a company

split hazel
#

I see

cinder sandal
#

sadly my motherboard only supports ddr4

boreal iron
#

"sadly"

earnest phoenix
#

ddr4 is good enough

rocky hearth
#

how to check, what ddr version ram my motherboard supports?

earnest phoenix
#

google your motherboard

boreal iron
#

Or open the task manager and take a look

sharp thicket
#

so i have a custom command and want to put variables in it this is like my setup can i use .replace() ?

 if (data) return message.channel.send(data.Content);```
boreal iron
#

data.Content.replace(x, y) sure why not

hollow goblet
#

how do i invite my bot in a server

earnest phoenix
#

how do i invite my bot in a server
@hollow goblet You need an invite URL for it

#

There is an OAuth tab on your bot application page

#

Go there, click the bot scope, select what permissions your bot needs for servers then copy the ID

hollow goblet
rose warren
earnest phoenix
#

@hollow goblet click the bot scope

hollow goblet
#

I did

earnest phoenix
#

@hollow goblet no you haven't

#

click the checkbox

rose warren
#

I know 😂

hollow goblet
earnest phoenix
#

Yes

#

Select the bot permissions

rose warren
#

Now check the perms

earnest phoenix
#

Then copy the link

hollow goblet
#

ok what i click in bot perms

rose warren
#

Whatever your bot needs to work

#

Don't take the easy route and click "admin". That's not good practice.

earnest phoenix
#

Yeah

#

If your bot has security bugs and admin many servers will die because of hackers

#

Only select the permissions it NEEEEEEEEEEEDS

hollow goblet
#

i selected what it needs.

#

now what

rose warren
#

Copy the link it gives you

earnest phoenix
#

Click the copy button

hollow goblet
#

i copyed

earnest phoenix
#

That's the URL you give to people to invite the bkt

rose warren
#

Then paste into your browser 😂

hollow goblet
#

thank you so much.

candid sandal
#

Call y’all join my server and help me get to 100 people?

earnest phoenix
#

no

candid sandal
#

Wow

#

Rude

#

Bitch

split hazel
#

No

earnest phoenix
#

take your shilling elsewhere, incel

split hazel
#

and this is development

candid sandal
#

YALL IS MEAN

earnest phoenix
#

@candid sandal You should have asked politely

candid sandal
#

I did

earnest phoenix
#

And we're not being rude here

candid sandal
#

I just asked can y’all join a server

#

And “no”

earnest phoenix
#

You called cry a bitch

candid sandal
#

Bc

earnest phoenix
#

It's people's choice to join your server

candid sandal
#

She or he was rude

earnest phoenix
#

If they disagree they aren't rude

#

They have the fucking right to disagree

mild flower
#

im getting unhandled promise rejection errors
UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Permissions

#
let buser = message.guild.members.cache.get(args[0]) || message.mentions.members.first() || args[0]

buser.ban({reason: breason}).catch(err => {
            message.channel.send(`I can't ban someone with a role higher than me!`)
        })```
#

even though i have a .catch

thin turret
#

Try logging err

mild flower
#
    at RequestHandler.execute (C:\Users\farah\Elitebot\node_modules\discord.js\src\rest\RequestHandler.js:170:25)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  method: 'put',
  path: '/guilds/710369656262623253/bans/411548232133640203',
  code: 50013,
  httpStatus: 403
}```
thin turret
#

There you go

feral aspen
#
const colors = require("../../colors.json")
const welcomeChannel = require("../../welcomeChannel.json");

module.exports = async (bot, message, member) => {
    const channel = welcomeChannel[message.guild.id].channel

    if(channel === null) return;
    if(!channel) return;

    console.log(message)

    const embed = new Discord.MessageEmbed()
    .setColor(colors.cyan)
    .setTitle(`Welcome ${member.user.username}`)
    .setDescription(`Welcome to **${member.guild.name}**, ${member.user.username}.`)

    bot.channels.cache.get(channel.id).send(embed)
}``` Cannot read property "user" of undefined.
#

Cant seem to know why

mild flower
#

but why isnt the .catch detecting it

#

thats what im asking

thin turret
#

It did

#

The error is the catch block

mild flower
#

bruh

#

im saying

#

that the .catch is not sending the message but instead giving me an error

#
            message.channel.send(`I can't ban someone with a role higher than me!`)
        })```
#

its not sending the message i have set on for .catch

feral aspen
#

use .then

#

maybe?

earnest phoenix
#

@feral aspen are you passing member when running the function?

mild flower
#

WAIT WHAT

#

how is iit working now

feral aspen
#

@feral aspen are you passing member when running the function?
@earnest phoenix Yes.

earnest phoenix
#

show

feral aspen
#
const colors = require("../../colors.json")
const welcomeChannel = require("../../welcomeChannel.json");

module.exports = async (bot, message, member) => {
    const channel = welcomeChannel[message.guild.id].channel

    if(channel === null) return;
    if(!channel) return;

    console.log(message)

    const embed = new Discord.MessageEmbed()
    .setColor(colors.cyan)
    .setTitle(`Welcome ${member.user.username}`)
    .setDescription(`Welcome to **${member.guild.name}**, ${member.user.username}.`)

    bot.channels.cache.get(channel.id).send(embed)
}```
#

Bruh, member.

#

async (bot, message, member)

#

idk when I remove the message, it doesnt work

thin turret
#

member.user?

feral aspen
#

something wrong with the code..

thin turret
#

What is member

feral aspen
#

this is for the guildMemerAdd event

earnest phoenix
#

@feral aspen bro when the function is called in the command handler are you passing the third argument

#

not in the declaration
in this:

yourFunction(firstArg, secondArg, thirdArg);
#

that's called calling

feral aspen
#

This is my handler..

#

module.exports = (bot) => {
    const load = dirs => {
        const events = readdirSync(`./events/${dirs}/`).filter(d => d.endsWith('.js'))
        for (let file of events) {
            const evt = require(`../events/${dirs}/${file}`)
            let eName = file.split(".")[0]
            bot.on(eName, evt.bind(null, bot))
        }
    }
    ["client", "guild"].forEach(x => load(x))
}```
earnest phoenix
#

@feral aspen BRUH

feral aspen
#

shout I add message in to the .bind()

earnest phoenix
#

do you even understand what I'm trying to say

feral aspen
#

Yes

rose warren
#

Show your guildMemberAdd event

feral aspen
#

Its up

rose warren
#

Show the code that does client.on("guildMemberAdd"...

earnest phoenix
#

when you're ➡️ ***__CALLING__*** ⬅️ the function are you passing the third argument

rose warren
#

In your events directory

feral aspen
#

bot.on(eName, evt.bind(null, bot))

earnest phoenix
#

bruh

#

You're not passing the third argument there

rose warren
#

Yup

feral aspen
#

Is there something I should add for it to work?

earnest phoenix
#

You need to pass a GuildMember object as your function needs it

#

The third argument

feral aspen
#

when you're ➡️ ***__CALLING__*** ⬅️ the function are you passing the third argument
@earnest phoenix I'm not that expert into understanding, so can you tell me on what I should do to fix?

earnest phoenix
#

spoonfeeding

feral aspen
#

Yea, I guess. 😐

earnest phoenix
#

Learn how functions work lol

rose warren
#

bot.on(eName, evt.bind(bot, message, member))

earnest phoenix
#

@rose warren BRO SPOONFEEDING

#

pls delete message

feral aspen
#

bro

#

that is not how it works

#

if I add message, then I would need to define it.

earnest phoenix
#

ask in plexidev they have better programmers than us

rose warren
#

You cant use member if you don't pass it

earnest phoenix
rose warren
#

You're only passing bot to the function

earnest phoenix
#

^ ^ ^ ^ ^

rose warren
#

Idk what's up with the null tho

earnest phoenix
#

^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^^ ^ ^ ^ ^ ^ ^ ^ ^

feral aspen
#

module.exports = (bot) => {
    const load = dirs => {
        const events = readdirSync(`./events/${dirs}/`).filter(d => d.endsWith('.js'))
        for (let file of events) {
            const evt = require(`../events/${dirs}/${file}`)
            let eName = file.split(".")[0]
            bot.on(eName, evt.bind(null, member, bot))
        }
    }
    ["client", "guild"].forEach(x => load(x))
}```
#

now in module.exports = ()

#

I should add member as well

#

and when i did that, it stopped the bot from running.

#

which is an oof.

earnest phoenix
#

because you are refusing to understand what the fuck we're saying

rose warren
#

They're not in the right order for a start

feral aspen
#

member is not defined

#

that is what I am saying

#

if I add member, it will error out not being defined

rose warren
#

Yes

#

You need to define it

#
#

Why are you binding null? Where does that come from?

feral aspen
#

someone told me to add it, so i did.

rose warren
#

🤦‍♂️

feral aspen
#

Ill see what it does if I remove it

#

ah

#

The bot didnt start

#

null kept it running

earnest phoenix
#

bruh

#
function smth(firstArg, secondArg, thirdArg) {
// do smth
}
smth("lol","uwu","fuck");
// Now the function can reference `firstArg` as "lol", `secondArg` as "uwu" and so on
rose warren
#

bot.on(eName, evt.bind(bot, message, member))

In module.exports:

module.exports = async (bot, message, member) => {... ```

Also I'd look into why removing null stops the bot from starting. Overall, I wouldn't handle events that way anyway.
#

But it comes down to the same thing, in order to call those variables in your command function, you have to pass them to the command.

feral aspen
#

in the bot.on, the member is not defined.

rose warren
#

Because it's using the same line of code to call bot.on("ready") and every other event, where member isn't there.

#

Call your events separately 🤷‍♂️

#

You're making life harder for yourself

#

Call your events directly in your bot.js file

#

Anything else is just overcomplicating it in my opinion

feral aspen
#

I call them like this ["console", "command", "event"].forEach(x => require(`./handlers/${x}`)(bot));

#

should I add the message and member next to the bot?

rose warren
#

Try it and see 😂

feral aspen
#

nah, it doesnt work

rose warren
#

Where did you find this code?

feral aspen
#

??

#

That is how I require the handlers folders.

quartz kindle
#

the bind function assigns a this value to it as the first argument

#

so if you do someFunc.bind(bot), then inside someFunc, you can use this.channels for example, because this was defined as being bot

#

there are 3 functions to assign a this value: bind, call and apply

barren garnet
#

do you have a bot for fifa ?

quartz kindle
#

bind assigns it to the function and returns a copy of the function with the value assigned, for future use
call and apply assigns it at the moment when you use the function

feral aspen
#

so @quartz kindle how can I assign member and message to every single event?

#

cause when i assign member in the guildMemberAdd.js event, member isn't defined

quartz kindle
#

how did you assign it?

feral aspen
#

module.exports = async (bot, message, member) => {

quartz kindle
#

there is no message in guildMemberAdd

feral aspen
#

I know, but when i remove it, it doesnt work

#

Can't seem to know why

quartz kindle
#

how did you bind it?

feral aspen
#

bot.on(eName, evt.bind(null, bot))

#

removing null stops the ready event.

quartz kindle
#

it should work if you remove the message

feral aspen
#

adding message and member inside it makes it undefined

#

it should work if you remove the message
@quartz kindle nope it doesn't. cannot read property 'message' of undefined

quartz kindle
#

wat

#

show your code

feral aspen
#

Which section, please?

quartz kindle
#

the guildMemberAdd event

feral aspen
#
const colors = require("../../colors.json")
const welcomeChannel = require("../../welcomeChannel.json");

module.exports = async (bot, message, member) => {
    const channel = welcomeChannel[message.guild.id].channel

    if(channel === null) return;
    if(!channel) return;

    console.log(message)

    const embed = new Discord.MessageEmbed()
    .setColor(colors.cyan)
    .setTitle(`Welcome ${member.user.username}`)
    .setDescription(`Welcome to **${member.guild.name}**, ${member.user.username}.`)

    bot.channels.cache.get(channel.id).send(embed)
}```
quartz kindle
#

there is no message here

#

you cannot use message at all

feral aspen
#

Well, Ill send the exact error when I remove message

#

I am using this in it

#

bot.channels.cache.get(channel.id).send(embed)

#

??

honest perch
#

tim, whats js

quartz kindle
feral aspen
#

(node:9076) UnhandledPromiseRejectionWarning: ReferenceError: message is not defined

quartz kindle
#

you're still trying to use message

feral aspen
#

that is the error when removing message

#

I removed it

quartz kindle
#

you have to remove message from EVERYWEHRE in that file

#

you still have console.log(message)

honest perch
#

welp goodluck tim

feral aspen
#

I am doing like a !setwelcome <channel> thing

#

I kept the message for the const channel = welcomeChannel[message.guild.id].channel

quartz kindle
#

there is no message

#

you're trying to get nothing

#

you need to work with what discord gives you

#

discord does not send you a message when a member joins a guild

#

there is no message

#

discord cant send you what doesnt exist

#

discord gives you a member, the member that joined

#

you have to do everything using only that member

#

nothing else

#

because nothing else exists in that scenario

earnest phoenix
#

Tim why are you even trying xd

feral aspen
#

So trying to make something new is violent, good job! 👏

rose warren
#

@feral aspen please learn about js functions

earnest phoenix
#

I'm just surprised you got a functional bot with 100 guilds without JS knowledge

rose warren
#

And refer to d.js docs

feral aspen
#

I will refer.

quartz kindle
#

all you really need to do

#

is replace message with member everywhere

#

because a member also has guild

feral aspen
#

when i add member, it will be undefined

#

that is the problem

quartz kindle
#

it wont

feral aspen
#

I wil see

#

One sec.

#

That surprisingly worked.

#

Oh my. 😮

quartz kindle
#

you did .bind(null, bot)
which means, this = null, 1st arg = bot, other args = args from the event
therefore (bot, <other aargs>) => {}
guildMemberAdd gives you 1 arg, a member, therefore: (bot,member) => {}

manic flame
#
dbl.webhook.on('ready', hook => {
  const dbl = new Discord.MessageEmbed()

  .setTitle(`Vote Hazır`)
  .setTimestamp()
  .setColor("BLUE")


  client.channels.cache.get("724311993086902338").send(dbl)
});

#

Why do I get that error?

feral aspen
#

you did .bind(null, bot)
which means, this = null, 1st arg = bot, other args = args from the event
therefore (bot, <other aargs>) => {}
guildMemberAdd gives you 1 arg, a member, therefore: (bot,member) => {}
@quartz kindle Alright! 👍

#

Ill do keep that in mind.

quartz kindle
#

@manic flame that means the channel was not found

#

possibly because the bot was not ready yet

manic flame
#

oh okey

#

should I move that part to client.on('ready'
?

earnest phoenix
#
{
    DiscordRichPresence discordPresence;
    memset(&discordPresence, 0, sizeof(discordPresence));
    discordPresence.state = "Playing Solo";
    discordPresence.details = "Competitive";
    discordPresence.startTimestamp = 1507665886;
    discordPresence.endTimestamp = 1507665886;
    discordPresence.largeImageText = "Numbani";
    discordPresence.smallImageText = "Rogue - Level 100";
    discordPresence.partyId = "ae488379-351d-4a4f-ad32-2b9b01c91657";
    discordPresence.partySize = 1;
    discordPresence.partyMax = 5;
    discordPresence.joinSecret = "MTI4NzM0OjFpMmhuZToxMjMxMjM= ";
    Discord_UpdatePresence(&discordPresence);
}```
#

this what language

heady heron
#

c#

#

@earnest phoenix

flint yew
#

Anyone know how to do setprefix in commando

earnest phoenix
#

ok

heady heron
#

commando?

#

the fuck is that

flint yew
#

Yes

rose warren
#

It's a djs library

heady heron
#

oh lol

woeful pike
#

that is not C# it's C or C++

earnest phoenix
#

lol

#

any buddy know how to use art assets

rose warren
#

Wdym?

earnest phoenix
#

ask to joi

#

n*

pearl trail
#

download from github, uh

#

presence or something

#

u need python3 to use that

manic flame
#
const Discord = require('discord.js')

exports.run = function(bot, message) {
  client=bot;
  const DBL = require("dblapi.js");
  const dbl = new DBL(client.dbl, client);
  dbl.hasVoted(message.member.id).then(voted => {
    if (voted){
      const dblVoteError=new Discord.MessageEmbed()
      .setColor('#2F3136')
      .setFooter('WİZARD', client.user.avatarURL({ dynamic: true }))
      .addField("![sahip](https://cdn.discordapp.com/emojis/716944043002560652.webp?size=128 "sahip")**Komutu kullanmak için lütfen botumuza oy verin.**![sahip](https://cdn.discordapp.com/emojis/716944043002560652.webp?size=128 "sahip")", " [Oy Ver](https://top.gg/bot/716723506393382922/vote)")
        return message.channel.send(dblVoteError);
    }
  });

    message.channel.send(new Discord.MessageEmbed()
    .setColor('#2F3136')
    .setTitle('🎲 Zarın: ' + doMagicDiceVoodoo()));

    function doMagicDiceVoodoo() {
        var rand = ['1', '2', '3', '4', '5', '6'];

        return rand[Math.floor(Math.random()*rand.length)];
    }
}

exports.conf = {
  enabled: true,
  aliases: ['zar'],
  guildOnly: false,
  permLevel: 0
};

exports.help = {
  name: 'zarat',
  description: 'Zar Atın',
  usage: ''
};

#

why it does not return from first if

pearl trail
#

discord.js v11?

manic flame
#

v12

earnest phoenix
#

@pearl trail can u give link

pearl trail
#

@earnest phoenix brb, i'll search

earnest phoenix
#
{
    DiscordRichPresence discordPresence;
    memset(&discordPresence, 0, sizeof(discordPresence));
    discordPresence.state = "24/7";
    discordPresence.details = "online";
    discordPresence.startTimestamp = 1507665886;
    discordPresence.endTimestamp = 1507665886;
    discordPresence.largeImageText = "Numbani";
    discordPresence.smallImageText = "Rogue - Level 100";
    discordPresence.partyId = "ae488379-351d-4a4f-ad32-2b9b01c91657";
    discordPresence.partySize = 1;
    discordPresence.partyMax = 5;
    discordPresence.joinSecret = "MTI4NzM0OjFpMmhuZToxMjMxMjM= ";
    Discord_UpdatePresence(&discordPresence);
}``` i need use this status
pearl trail
#

there

earnest phoenix
#

404

pearl trail
#

ah yes, private, wait

drifting wedge
#

How many servers per shard should I have?

pearl trail
#

done @earnest phoenix

#

2000(?)

rose warren
#

@drifting wedge roughly 1000

#

You need to start sharding before hitting 2,500

drifting wedge
#

@drifting wedge roughly 1000
@rose warren yep

#

I’m at like 90 ish

rose warren
#

I have about 850 - 950 per shard on mine

#

It shards automatically

drifting wedge
#

So I might like just have 2 shards

#

Just so I can make it bigger easily

#

It shards automatically
@rose warren wdym

rose warren
#

For 90 servers 1 shard is enough

#

I just use auto shard

pearl trail
#

how can i know how much my bot have shard?

drifting wedge
#

I just use auto shard
@rose warren I’m dpy

rose warren
#

Ah ok

#

I'm djs

#

Idk if dpy has it

drifting wedge
#

I mean can I like make a command

earnest phoenix
#

done @earnest phoenix
@pearl trail this use one main id??

drifting wedge
#

That lets me change shard count?

pearl trail
#

@earnest phoenix yes, the client id

earnest phoenix
#

how can i know how much my bot have shard?
@pearl trail You mean how many shards your bot has?

pearl trail
#

yes

drifting wedge
#

For 90 servers 1 shard is enough
@rose warren is 2 shards overkill / bad?

rose warren
#

Total overkill

earnest phoenix
#

<client>.shard.count

rose warren
#

I had 1 shard all the way up to 2,350 servers

#

No problem

drifting wedge
#

I’ll just shard it once ig

#

I use heroku

#

So performance isn’t too good

#

But it works great

rose warren
#

Keep the sharding setup but use 1 shard

drifting wedge
#

Yep

rose warren
#

Also, move away from heroku

earnest phoenix
#

@pearl trail can u public all time ??

rose warren
#

😂

pearl trail
#

use const ( shardManager ) = require('discord.js') ?

#

@earnest phoenix yes i can

rose warren
#

I started on heroku so I feel your pain

drifting wedge
#

How can I get the total channel count in all the servers?

earnest phoenix
#

Shards can only handle 2500 guilds each with no issues

drifting wedge
#

I started on heroku so I feel your pain
@rose warren I mean I haven’t had any issues at all tho

pearl trail
#

@drifting wedge client.channels.cache.size

rose warren
#

Shards can only handle 2500 guilds each with no issues
@earnest phoenix shards are recommended to hold around 1,000 each

drifting wedge
#

Python

#

?

pearl trail
#

no, djs

drifting wedge
#

@earnest phoenix shards are recommended to hold around 1,000 each
@rose warren with heroku, if I still use it, I might do like 2 shards per 500

earnest phoenix
#

use const ( shardManager ) = require('discord.js') ?
@pearl trail

const {
ShardManager
} = require("discord.js");```
#

@pearl trail how to host this heroku??

drifting wedge
#

My bad

earnest phoenix
#

@rose warren with heroku, if I still use it, I might do like 2 shards per 500
@drifting wedge That's overkill

pearl trail
#

@earnest phoenix thanks

drifting wedge
#

2 shards per 100

#

1000

rose warren
#

@drifting wedge get a cheap VPS plan. It's definitely worth it

drifting wedge
#

1/500

#

@drifting wedge get a cheap VPS plan. It’s definitely worth it
@rose warren I mean, I want to get my bot a bit bigger

#

Just don’t wanna go all in, and quit midway

rose warren
#

Look at Pulseheberg VPS hosting. They have good deals, cheap plans, and I've been using them for 6 months no problems

drifting wedge
#

Look at Pulseheberg VPS hosting. They have good deals, cheap plans, and I’ve been using them for 6 months no problems
@rose warren imma wait a bit tho

pearl trail
#

@earnest phoenix upload all your code to github, well i make the repo private so no one can access that. now, create Procfile in the repo and fill it with worker: node <your main file>, after that, create an account in heroku, connect it with github, scroll down, click the automatically deploy, and deploy

drifting wedge
#

Up till like 500 servers?

rose warren
#

Yeah

drifting wedge
#

Also, wuts the best way to get donations?

pearl trail
#

i use heroku to host my bot now

earnest phoenix