#development

1 messages · Page 1589 of 1

earnest phoenix
#

(node:12684) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'guild' of undefined

jolly mortar
#

i left it on overnight and got 700 rejection console logs KEKW

earnest phoenix
#

@pale vessel How to make a chat code for the bor in JS

#

??

misty sigil
#

what is that {author, channel}

#

just change it to messagfe

#

and remove message at the last one

#

ez

crimson vapor
#

thats probably destructured message

#

Lol

pale vessel
#

but why

#

they still provided message at the end

earnest phoenix
#

Hey help me nan

misty sigil
#

message is undefined

earnest phoenix
#

How can i define?

misty sigil
#

{author, channel} is in place of message

#

so replace {author, channel} with message and remove message at the end

pale vessel
#

oh I see

#

thanks

glossy spoke
#

author and cannel can be used without exporting it

#

message.author, message.channel

misty sigil
#

yea, they're properties of message

earnest phoenix
#

?

misty sigil
#

yes

earnest phoenix
#

I love u brooo ❤️ @misty sigil

misty sigil
#

right.

timber fractal
#

Thanks for you reply, but I already realized that so i putted it in index.js in the ready event, but still it gives the same error.

lusty quest
#

did you removed it from the command(s)

tired panther
#

Does array.includes check after the whole or the part content?

#

is it case sensitive?

solemn leaf
#

How do I use form data

pale vessel
#

If you want part of the content, use array.some()

tired panther
#

oki

earnest phoenix
#

is someone else getting break points in a file called async_hooks.js i have no idea where this come from and i dont even see that file in my folders i dont know when this happen either

toxic jolt
#

does not respond to any commands

river copper
#

need one who can make auto slotlist using bot
(Paid)

#

Can anyone make?

earnest phoenix
river copper
#

Only paytm

toxic jolt
#

oh

#

i looking now discord-news channel pls wait

#

no have a error

toxic jolt
#

This mistake drove me crazy.

#

There is no solution on the internet, I don't even know what its source is.

earnest phoenix
#

i dont really know this error but it usually happen to me when i have trouble connecting to certain apis

opal plank
#

@opaque fern its when the API TCP socket suddenly hangs

#

@toxic jolt you too

analog tinsel
#
<script>
$.getJSON("https://nocturnal.sh/api/memes", function (data) {
console.log(data)
})
</script>
#

where was something wrong?

solemn latch
#

your need cors

quaint wasp
#

y

solemn latch
opal plank
#

Options dont do anything

#

🤔

solemn leaf
#

if you want to do that

#

just

#

do

#

options?: string

#

token is a string

#

not any

crimson vapor
#

I asked the same thing

pale vessel
#

lol

crimson vapor
#

I was like "what in the fuck is this"

opal plank
#

there are none currently

crimson vapor
#

yea

#

idk

#

he is strange

pale vessel
#

why is token any

crimson vapor
#

@slim heart

pale vessel
#

bro

#

why

#

he can't reply

crimson vapor
#

expert role collector

quaint wasp
#

but bruh

solemn latch
#

Looks like your in a method then

earnest phoenix
#

codejs let member = (await reaction.message.guild.members.fetch()).find(member => member.id == user.id)error:

#

help

quaint wasp
#

when its upper is doesnt record at all.

marble juniper
#

is your function async

#

lol

earnest phoenix
marble juniper
#

lol

#

so I can see

earnest phoenix
# marble juniper show full code then
client.on("messageReactionAdd" ,async reaction => {

    if(reaction.message.member == null || reaction.message.guild == null) {
        return(false)
    } else {

        if(reaction.users.cache.some(user => {
            //true/false function
            let member = (await reaction.message.guild.members.fetch()).find(member => member.id == user.id)
            return((member.roles.cache.some(role => role.id == 810585135849144321)) && (user.bot==false))
        })){
            //if loop
            if(reaction.emoji.name == "✅"){
                reaction.message.member.setNickname(reaction.message.content)

                let role = reaction.message.guild.roles.cache.find(role => role.id == 810585135849144321)
                reaction.message.member.roles.add(role)
            }
            reaction.message.delete()
        }
    }

})```
marble juniper
#

no its not

#

becauuuuuse

earnest phoenix
#

oh the user =>

marble juniper
#

you are calling another function

#

and that one is not async

earnest phoenix
#

🤦‍♂️

#

tysm

marble juniper
#

no problem

#

lol

quaint wasp
#

How do I make it be part of code?

#

When its under that }, its an error.

marble juniper
#

well thats because you are putting it in ur object

#

and that will obviously throw an error

#

just put it after the first }

#

not after the second

quaint wasp
#

same thing.

exotic vigil
#

s! 797275848108802098

#

797275848108802098

#

sl!797275848108802098

opal plank
exotic vigil
#

ok luca prefix ?

opal plank
exotic vigil
#

okay

earnest phoenix
#

okay a try{}then{} should work right @marble juniper?

earnest phoenix
copper cradle
#

boi just put it over the return statement

#

anything directly under it will never run

marble juniper
#

oh im stupid I didn't see the return Statement

#

kekw

warm junco
#

would anyone here happen to know how i could set a cooldown to the default help command? i already have cooldowns implemented for other commands through the @commands.cooldown decorator, is there any way to pass this to help? (python rewrite, also using pretty help btw if that makes any difference)

copper cradle
shrewd stream
#

php or node.hs which one

warped patio
#

Ur missing ;

#

At h2

#

:(

solemn latch
#

whats your html look like?

#

whats the actual html code look like

pale vessel
#

Why do you have head and body tags

solemn latch
#

so, webpages already have a body tag, and a head tag.

#

you also probably dont want to add doctype, html, or those meta tags

prisma arrow
#

whats 2 + 2?

pale vessel
#

idk

#

Can you answer that for me

prisma arrow
#

yea 4

pale vessel
#

Oh

prisma arrow
#

but whats 0.1 + 0.2?

pale vessel
#

Interesting

#

That's 89 of course

prisma arrow
#

thats when u know JS is good

#

?

#

what the html code or 0.1 + 0.2

quaint wasp
prisma arrow
#

i did that in the chrome console

quaint wasp
#

How do I make the folderunziped?

prisma arrow
#

get 7zip

quaint wasp
#

?

prisma arrow
#

or right click it and press unzip

pale vessel
#

7zip is the best

prisma arrow
#

does that work smug?

opal plank
#

paid winrar is the best@pale vessel

prisma arrow
#

ew

pale vessel
#

I disagree

prisma arrow
#

theres 7zip

#

yw

pale vessel
#

actually I've never used it

opal plank
#

indeed, you need to be cultured to pay for winrar

pale vessel
#

but I just prefer open source software

#

and 7zip is light af

quaint wasp
#

?

pale vessel
#

It's a zip file

#

You don't even need that

#

Just right click and select extract all

#

You can't be serious

quaint wasp
#

shoot

#

I was blind as usual.

prisma arrow
#

yea

#

extract all

mellow kelp
#

paid winrar is the ultimate flex

proven lantern
#

7zip > winrar

earnest phoenix
#

snif

quaint wasp
#
 pm2 start index.js
pm2 : File C:\Users\Emir\AppData\Roaming\npm\pm2.ps1 cannot be loaded because running scripts is disabled on this
system.```
#

How do I enable it?

solemn latch
#

windows system? 🤔

quaint wasp
#

yep.

dire obsidian
#

ik this might be simple but, how do you react a message that was sent by the bot

quartz kindle
#

winrar > 7zip

dire obsidian
cloud nacelle
#

@zenith knoll !

#

@zenith knoll

solemn latch
#

please dont tag random people

glossy spoke
glossy spoke
quartz kindle
#

either await or .then()

#
let a = await message.reply();
await a.react()

or

message.reply().then(a => a.react())
dire obsidian
ornate otter
#

const user = bot.guilds.resolve(baseID).members.resolve(e.user_id) returns null

#

It used to work, now it doesnt, and sometimes it does, sometimes it doesnt

summer torrent
#

Why resolve

ornate otter
#

cus it works

#

what would u use?

#

well it used to

summer torrent
#

fetch or cache.get

ornate otter
#

cache.get returns undefined

#

same with fetch

summer torrent
#

then there is no member with this user id

ornate otter
#

there is tho

#

Cus if i hard code an id and guild id

#

then it still doesnt work

summer torrent
#

did you enable guild_members intent

quartz kindle
#

if you have the id, resolve is not necessary

#

the resolve function is to "try" to get the data in various different ways, for example getting a member from a message or from a presence

#

members.resolve(presence)

#

but if you have the ID, then use get

#

members.cache.get(id)

#

same with guilds

#

bot.guilds.cache.get(id)

ornate otter
#

it should be

quartz kindle
#

besides that, .get() will not work if the member is not cached

#

neither will resolve()

ornate otter
#

so, how would you suggest doing it

quartz kindle
#

fetch

ornate otter
#

so bot.guilds.fetch(baseID).members.fetch(e.user_id)

quartz kindle
#

not on guilds

#

only members

#

guilds are never not cached

ornate otter
#

Ok

quartz kindle
#

and you have to await it since its a promise

ornate otter
#

Thank you @quartz kindle c:

rare trail
#

hi, my bot got approved on top.gg like 20 min ago, now i want to do a command that returns me a list of the users has voted my bot, at now i have this:

    @commands.command()
    async def votes(self, ctx):
        getvote = await dbl.DBLClient.get_bot_upvotes(self)
        await self._ensure_bot_user()
        await ctx.send(getvote)

but it doesn't work, any suggest?

placid iron
#

what does await self._ensure_bot_user() do

#

also, what is the error it is giving lol

opal plank
#

@rare trail keep in mind, for now that should work fine, but past 1000 votes you'll need to use webhooks

rare trail
#

the error is discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Top' object has no attribute '_ensure_bot_user'

opal plank
#

since it cant return more than 1000 votes

placid iron
#

try removing that line then lol, i cant see a use for it anyway

quartz kindle
#

where did you even get that line from?

rare trail
placid iron
#

what?

quartz kindle
#

the result cant be the same

#

at the very least the error should be different

rare trail
# placid iron what?

if i remove that line : await self._ensure_bot_user(), i still get the same error

quartz kindle
#

thats not possible

placid iron
#

^

quartz kindle
#

do you have that line somewhere else?

#

did you restart the bot?

rare trail
#

y, 3 times

placid iron
#

also the method should be get_bot_votes()

quartz kindle
#

show the full error

placid iron
#

i belive that error is from the source code of the dbl package

#

lmao

rare trail
#
Ignoring exception in on_command_error
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/discord/ext/commands/core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "/root/Choco/cogs/topgg.py", line 25, in votes
    getvote = await dbl.DBLClient.get_bot_votes(self)
AttributeError: type object 'DBLClient' has no attribute 'get_bot_votes'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/discord/client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "/root/Choco/cogs/handler.py", line 54, in on_command_error
    raise error
  File "/usr/local/lib/python3.8/dist-packages/discord/ext/commands/bot.py", line 902, in invoke
    await ctx.command.invoke(ctx)
  File "/usr/local/lib/python3.8/dist-packages/discord/ext/commands/core.py", line 864, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/usr/local/lib/python3.8/dist-packages/discord/ext/commands/core.py", line 94, in wrapped
    raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: type object 'DBLClient' has no attribute 'get_bot_votes'
quartz kindle
#

type object 'DBLClient' has no attribute 'get_bot_votes'

#

see, the error is different

#

its not the same error

rare trail
placid iron
#

also, i think you have to update your dbl-py because in the latest version there is get_bot_votes

quartz kindle
#

should be dbl.get_bot_votes(self) or self.get_bot_votes(self)

placid iron
#

you arent supposed to put self into a function. self refers to the class (itself)

rare trail
placid iron
#

yup

#

that command is in a cog, correct?

rare trail
#

yes

quartz kindle
#

ye idk python, but for sure its not dbl.DBLClient

rare trail
#

already all up-to-date

placid iron
#

so in the init of the cog you should set up a dbl client like such

#

interesting

rare trail
placid iron
#

okay, so then you can do self.dblpy.get_bot_votes()

quartz kindle
#

the examples show this await self.dblpy.post_guild_count(server_count)
so logically it should be await self.dblpy.get_bot_votes()

placid iron
#

yep

rare trail
placid iron
#

lol that is confusing, ig just turn it back itno get_bot_upvotes for the time being

#

@rare trail btw what version did it say you had of dblpy

placid iron
#

👌

rare trail
#

with upvotes

#

now to get the value like username, what i need to do? (sorry, i'm a beginner)

quartz kindle
#

the function returns a list of user ids

solemn latch
#

credits is pretty common

placid iron
rare trail
placid iron
#

but i would check the cache first

#

@rare trail you would have to get the username for each user_id

#

im sure you can work that out

mental cloud
#

What is the best way to reward users for voting? For example, I want to reward only 1x per vote, but I don't know how to do that...
Since top.gg doesn't provide how much time is left before I can vote again...

solemn latch
#

what do you mean? 🤔

#

like how do you get a vote event?

mental cloud
# solemn latch what do you mean? 🤔

For example, I want to reward a user who voted, but I want this reward to be daily... If he votes today, he will be rewarded and if he does not vote tomorrow he will not be rewarded, but if he votes the day after tomorrow he will be rewarded.

#

I am using a translator because I am not very good with English 😢

solemn latch
#

you can use vote webhooks

mental cloud
#

Webhook URL, I don't understand where I get this link?

lyric mountain
#

the webhook url should be your VPS' IP (or domain if you own one) + port with the path to your webserver's endpoint

quartz kindle
#

or your project url if you host in places like heroku, glitch or repl.it

lyric mountain
#

for example 127.0.0.1:1234/dbl

#

for this, you need to use some lib like express

#

iirc, top.gg lib has webhook listeners included

earnest phoenix
#

I don't know if this makes sense but I'm somehow getting member logs from other servers to my server, through my bot.

quartz kindle
#

are you using a fixed channel id for your logging?

earnest phoenix
#

yes

quartz kindle
#

then thats why

crimson vapor
#

Tim in what country do you live currently?

earnest phoenix
#

tbh idk what fixed channel id's are, i assume you meant a text channel id

quartz kindle
#

portugal

lyric mountain
#

if you hardcode an ID, any server will send the logs to your server

crimson vapor
#

ah

earnest phoenix
#

oh im using a database lmao

crimson vapor
#

Tim how many citizenships do you have?

lyric mountain
#

fixed id -> 272764566411149314 = this channel

quartz kindle
#

citizenships only 1

#

residence permit 3 i guess

lyric mountain
#

Earthling citizenship

quartz kindle
#

although you could count europe as a single thing, so only 2

solemn latch
#

i like this dev conversation

quartz kindle
#

yes

#

very dev

lyric mountain
#

developing a conversation

quartz kindle
#

i am dev so everything i say is dev

#

:^)

earnest phoenix
#

The way I set my logging channel is through a database using a Mongoose provider, i.e.
this.client.settings.set(<Message>.guild.id, 'logs', <Channel>.id)

#

I don't understand why it does that. The logging channel id isn't hardcoded.

quartz kindle
#

show the code where you send the logs

earnest phoenix
#

wait i think ik why it does that, possibly because im retrieving the channel through client
in other words this.client.channels.cache.get(<Channel>.id);

crimson vapor
#

therefore I can talk about tim in his channel

lyric mountain
#

even if you did that

earnest phoenix
#

so that wouldn't be the issue

#

aight ill send the source bin

lament rock
#

You can also find Erwin in this channel pretty often as well

obtuse jolt
opal plank
#

i was summoned

#

who summoned me?

crimson vapor
#

wtf

#

I swear

quartz kindle
earnest phoenix
#

Guild.prototype.logs = this.client.settings.get(message.guild.id, 'logs', null);

crimson vapor
#

when you ping erwin it takes like 100 years

lament rock
#

No summoning ritual has been conducted. Just ACKing your intellectual prowess

crimson vapor
#

but if you don't mention him he spawns immediately

quartz kindle
#

yeah thats wrong

#

very wrong

opal plank
#

i see i see

quartz kindle
#

you are assigning it to the guild prototype

earnest phoenix
#

uh oh, tim gonna lecture me

quartz kindle
#

the prototype applies to all instances of Guild

earnest phoenix
#

fuck sake

quartz kindle
#

so all guilds will have the same thing

#

if you want to use the guild prototype, you have to make it a function or a getter

#

so that when you access it, it gives you the correct value based on which guild it is

#

and not a fixed value

crimson vapor
#

djs-light is literally prototype pollution

earnest phoenix
#

yeah, i fucked it there

lament rock
#

Object.defineProperty for assigning getters

earnest phoenix
#

thanks ^

quartz kindle
#

you can also use discord.js' class extensions

#

much easier to add stuff to Guild that way

lament rock
#

Nothing wrong with prototype assignment so long as it's loaded early on as to not fuck the prototype chain later once most of it has been constructed

crimson vapor
#

lmao

#

make a command

#

that does it

obtuse jolt
#

tim with your extensive php knowledge can you help me

quartz kindle
#

extensive php knowledge? lmao

obtuse jolt
#

more then me at least

ornate otter
#

Does anyone know if the new update to the sites css would have messed up anything t o do with the name and shortt description wrappers

earnest phoenix
#

I could extend the Guild class right?

quartz kindle
#

yes

earnest phoenix
#

ok all sorted then

#

thanks

quartz kindle
#

discord.js has a built in way to extend it

obtuse jolt
earnest phoenix
#

Structures.extend it should be

quartz kindle
#

yup

obtuse jolt
#

"Uncaught Error: Cannot pass parameter 3"

#

the error is on the 2nd line

solemn latch
#

making a sharex server?

obtuse jolt
#

yes

solemn latch
#

fun

obtuse jolt
#

a sharex url shrinker to be more specific

quartz kindle
#

is there any more information in the error?

#

php errors suck ass

obtuse jolt
#

this is the full error
Sun Feb 14 19:38:04.324600 2021] [proxy_fcgi:error] [pid 14582] [client ***.***.**.***:59606] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Cannot pass parameter 3 by reference in /var/www/vhosts/tnylnk.org/api.tnylnk.org/sharex.php:71\nStack trace:\n#0 {main}\n thrown in /var/www/vhosts/tnylnk.org/api.tnylnk.org/sharex.php on line 71'

quartz kindle
#

are you using PDO?

obtuse jolt
#

mysqli

quartz kindle
#

this is stupid

#

but try assigning variables to those strings

#

and then passing the variable instead of the literal string

obtuse jolt
#

alright

#

i have so many questions now

#

the main one being, why

#

it works now

quartz kindle
#

according to the docs

#

bind_param in mysqli only accepts references and not literal values

obtuse jolt
#

is there a specific reason why its that way?

quartz kindle
#

idk

#

maybe its just old

obtuse jolt
#

php is weird

vapid crown
#

Can someone help

#

I am using pure html and css btw

#

@solemn latch

solemn latch
#

i dont know much html and css

#

you should just ask your question

vapid crown
#

Is it possible for me to put api data like the upvotes onto my website without the widget

grizzled raven
#

you can, using javascript or ejs

#

you need to get the number of votes yourself though

solemn latch
#

^

#

its more of a backend thing than a front end(html, css) thing

vapid crown
#

So i have to manually get the votes

#

ST_haHAA than whats the point

solemn latch
#

displaying in a format more in the style of your website

#

most common way i see that kind of stuff used

obtuse jolt
placid iron
#

can you put the date infront of the time

#

also maybe remove the seconds

#

its not really that important

obtuse jolt
placid iron
#

yep

crimson vapor
#

result doesn't match

#

you should change to something like URL: click here

obtuse jolt
#

what

quaint wasp
#

This means,,,

crimson vapor
earnest phoenix
#

Huh, what are the errors?

crimson vapor
#

umm

#

lemme send screenshot

quaint wasp
#

How do U make VSC like that? Mine looks all ugly and yalls look better.

#

Also

#

I get this error:

crimson vapor
#

themes

quaint wasp
#

ooh

crimson vapor
#

do you use process.exit() anywhere?

quaint wasp
#

me?

crimson vapor
#

yes

quaint wasp
#

no.

crimson vapor
#

hmm

#

do you throw anywhere?

earnest phoenix
#

Lemme fix that real quick

#

can some1 help me get my website online?

#

i own a domain

solemn latch
#

do you have a specific question or?

earnest phoenix
#

can some1 help me get my website online?

#

i am local hosting

mellow kelp
#

@quaint wasp does your bot even need sharding?

earnest phoenix
#

or want to

mellow kelp
#

or wait nvm

#

actually that error is kinda weird

earnest phoenix
solemn latch
#

i can help with a specific question, not general questions

quaint wasp
#

I feel like it.

#

me?

#

Well..

#

I sharding..

#

Is kinda mest up.

mellow kelp
#

did you try to set up sharding?

#

with the shardmanager and that stuff

quaint wasp
#

that is sharding manager..

mellow kelp
#

i mean what did you actually code

#

did you try to create a shardmanager?

crimson vapor
#

@earnest phoenix if you want I can just pr it

mellow kelp
#

or do you just use a normal client

crimson vapor
#

that would be easier probably

earnest phoenix
crimson vapor
#

hi Extreme

#

why are you here

#

what do you need?

blissful coral
#

Would this work Thonk

mellow kelp
#

wait what

quaint wasp
#

no

crimson vapor
#

I dont think so

earnest phoenix
crimson vapor
#

client doesn't have property schema

blissful coral
#

I made it

#

lmao

#

wait

#

class Schema extends Client

#

hm

mellow kelp
#

what

blissful coral
#

Client.Schema isn't correct

crimson vapor
#

class extends class

blissful coral
#

I am dumb

#

LMAO

crimson vapor
#

client.schema is not the new clas

blissful coral
#

anywayssss

#

Schema is

#

Yea

earnest phoenix
quaint wasp
#

help.. Please... anyone..

mellow kelp
#

dot dot dot™️

earnest phoenix
quaint wasp
solemn latch
#

you put your domains dns settings to your id

#

ip*

earnest phoenix
umbral zealot
# quaint wasp

dude your bot is on 13 servers why tf as you sharding.

blissful coral
#

^^

#

lmao

quaint wasp
#

I feel like it.

umbral zealot
#

You don't need to until you're on 2000+

blissful coral
#

no point

#

to shard

#

and break your bot

umbral zealot
#

It's literally pointless.

blissful coral
#

With 13 servers

quaint wasp
#

oh

#

waitt

blissful coral
#

It actually make it slower lmao

quaint wasp
#

Im creating a new bot.

blissful coral
#

may*

quaint wasp
#

And its in..

#

umm...

#

well.

opal plank
#

there shouldnt be any harm in sharding, but still, wtf sharding with 13 servers for prod is stupid

umbral zealot
#

1 servers? lol

quaint wasp
#

1 Server..

mellow kelp
#

i swear this guy is the dot dot dot CEO

umbral zealot
#

Yeah don't fuck with sharding, you do'nt need it.

opal plank
#

sounds like me spawning 6 shards for 1900 guilds

#

but thats me testing

crimson vapor
#

imagine not sharding

opal plank
#

its not on prod yet

blissful coral
#

yeah lmao

#

That's different

crimson vapor
#

this post was made by forced sharding gang

blissful coral
#

Your just testing

crimson vapor
#

you're*

quaint wasp
#

I feel like everytime I come here people make it a meme....

#

lol

opal plank
#

well, its the law of reaction

umbral zealot
#

Maybe you're the meme.

quaint wasp
#

bra

opal plank
#

if you post dumb stuff, we'll react to it

#

¯_(ツ)_/¯

earnest phoenix
solemn latch
#

sharding 1 server 🤔

quaint wasp
#

I guess thats fair..

quaint wasp
#

also

solemn latch
#

an a record is where your ip goes

blissful coral
#

because it is literally just a regular client at that point

umbral zealot
#

Sharding at 1 or 13 guilds is like trying to learn how to be a fighter pilot but your only vehicle is a 2008 Civic.

blissful coral
#

I can't wait for the next thing he says to be I want 10 shards for a single server

#

lmao

quaint wasp
#

What is sharding anyway? I just got this suggestion from my friend..

blissful coral
#

Oh

#

My

#

Gawd

solemn latch
#

well a shard is separating many servers across multiple connections

opal plank
#

Sharding at 1 or 13 guilds is like using a motorcycle to go from your bedroom to your kitchen.

mellow kelp
#

it's like trying to get a driver's license for one of those small plastic cars for kids

opal plank
#

shardin is splitting your servers into different threads(clustering)

blissful coral
#

Why the hell would you use 3 shards for a single server........

opal plank
#

each shard is responsible for x amount of guilds

umbral zealot
#

Point is: you don't need to worry about that at all.

opal plank
#

so you split the workload

earnest phoenix
#

@crimson vapor What about now? Does it throw errors

opal plank
#

theres no need at ALL to use it at less than 1k servers

#

1500 is when people recommend u start looking into it

#

remember that sharding is only required at 2500

mellow kelp
#

i thought it was 2000 at a minimum?

#

o

opal plank
#

so you still got a 1000 gap to breath

quaint wasp
#

what about 12? I think thats good amount of servers per shard... I mean... Caount to 12.

earnest phoenix
#

do i put my IP in the 'name' part

quaint wasp
#

its 1 2 3 4 5 6 7 8 9 10

#

then..

#

uhh

umbral zealot
#

You do not need sharding.

opal plank
#

basically, if you are doing it to learn, dont do it

quaint wasp
#

I think 11.

blissful coral
#

You do know

#

A bot with 10k servers

#

Only has 5 shards

#

Do the math

opal plank
#

if you wanna test? SURE, otherwise, dont

quaint wasp
#

I um... Wanna learn.

blissful coral
#

If you don't know how to shard by just learning js, then don't

mellow kelp
#

i love how every time someone says something dumb in this channel we achieve "Several people are typing"

blissful coral
#

You will learn it when you learn js

crimson vapor
#
export interface options {
export interface OptionsAndFlagsObject {
export Function``` @earnest phoenix
blissful coral
#

Don't skip steps

opal plank
#

the only real reason you'd want to shard at less than 2k servers would be if you're doing some heavy thread stuff

umbral zealot
#

Sharding is distributed computing so that Discord's servers don't have lagging issues on larger bots with a lot of different servers. There is zero benefit to sharding for you, only problems.

#

Don't shard.

earnest phoenix
#

@solemn latch for the 'name' do I put my IP?

solemn latch
#

name is the subdomain, target is your ip

earnest phoenix
#

I don't have a subdomain

opal plank
#

imagine the following scenario:

you using canvas, on EVERY command. You start noticing that your hosts cpu is being at 100% a lot of times, so what do you do?

you split servers into chunks and assign each to a different cpu thread, so the work is evenly split and you arent overloading a single one, since node is single threaded.

earnest phoenix
#

I only have a domain

solemn latch
#

subdomains come with any domain

quaint wasp
#

FINE. Ill ... Umm... create bunch of alts and then create 100 serers on each account and then invite my bot to each to make it 1,013 servers so I could shard.

Me the big brain.. is so smart..

crimson vapor
earnest phoenix
solemn latch
blissful coral
#

pog tos

umbral zealot
earnest phoenix
#

oh

opal plank
#

your bot has been flagged with innorganic growth, please wait a couple weeks

earnest phoenix
#

then mine is didi-web

quaint wasp
#

BRAH

blissful coral
#

its physically impossible to add your bot to more then 15 servers you own

quaint wasp
#

NO

crimson vapor
quaint wasp
#

alr Ill umm

blissful coral
#

and I am pretty sure it is based off of IPs now

quaint wasp
#

Kick it off

blissful coral
#

huh

umbral zealot
#

just fucking drop it

quaint wasp
#

the servers.

opal plank
#

you're fighting a fight you cant win smug

umbral zealot
#

it's a useless converastion

opal plank
#

better to call it off

solemn latch
#

honestly, if you want to shard, shard. youll just be wasting resources for no reason

opal plank
#

dont shard unless you have to

quaint wasp
#

wasting resources
Wut?

blissful coral
#

Your wasting cpu threads

opal plank
#

or you planning on learning

solemn latch
#

sharding increases resource usage.

quaint wasp
#

ok..

solemn latch
#

its why you are really not supposed to do it until you need it

earnest phoenix
blissful coral
#

Don't shard until you understand all of js

opal plank
#

not only cpu threads, ram too, you're creating more instances per shard you create

#

you're spawning more worker threads

quaint wasp
#

I think I got lots of that. I mean.. I got like 660 G open to storage..

blissful coral
#

If you want to learn how to shard, look up a guide depending on the library and lang you are using

quaint wasp
umbral zealot
#

You know the best part of this? You can shard with zero effort: ```js
const client = new Discord.Client({
shards: 'auto',
});

Boom. You're sharding. Done. kthxbai.
blissful coral
#

What language are you using anyway

#

That has nothing to do with it....

quaint wasp
#

Js.

opal plank
#

storage !== ram

blissful coral
#

That is not the same thing

quaint wasp
#

why

opal plank
solemn latch
opal plank
#

126Gb of ram

#

2Tb of storage

#

2 different things

solemn latch
#

or maybe someone else can help you more

earnest phoenix
lyric mountain
quaint wasp
#

What are TBs'?

opal plank
#

terabytes

blissful coral
#

Oh my

earnest phoenix
#

Just drop it, sharding when your client is in lower than 1k servers is absolutely useless, even if you're doing this to learn it, just don't

quaint wasp
#

are those more than Gs'?

blissful coral
#

@quaint wasp Question, do you know what a constant and a variable is? Real question

opal plank
#

b, kb, mb, gb, tb, etc

quaint wasp
#

oh, ok..

umbral zealot
#

after terabyte is petabyte 😉

opal plank
#

1024 until the next step, with one exception that goes to 1000 for some god fucking knows what reason

#

i dont recall which

quaint wasp
blissful coral
#

define them

opal plank
#

but i do know theres one of the measures that is 1000 and not 1024

#

cuz logic

lyric mountain
#

then he discover there are:
b, Kb, Mb, Gb, Tb, Pb
B, KB, MB, GB, TB, PB
iB, KiB, MiB, GiB, TiB, PiB

umbral zealot
#

I don't see the point in trying to bash this guy's knowledge.

quaint wasp
#

variable is umm... A word that has a function, or code in it..

lyric mountain
#

all different stuff

earnest phoenix
#

Bruh

blissful coral
#

oh my

#

learn js before making a discord bot

#

Trust me it is worth it

umbral zealot
#

Can we just stop noobshaming, please? hug

quaint wasp
#

Constant is...

#

um

#

I forgot.

blissful coral
#

Trying to see what they know seriously evie

opal plank
#

its in the name

#

constant

#

not changing

quaint wasp
#

OH

opal plank
#

immutable

quaint wasp
#

const.

opal plank
#

correct

quaint wasp
#

It deffines stuff

opal plank
#

indeed

lyric mountain
#

no

quaint wasp
#

wut

opal plank
#

well kinda

#

its a variable

lyric mountain
#

it defines stuff that won't change

opal plank
#

but constants cant be changed

#

once declared, they cannot be reassigned

quaint wasp
#

does stuff like this

umbral zealot
#

@quaint wasp if you want to learn/try stuff, I suggest you go through a tutorial or two, links to learning javascript here: <#development message>. It'll serve you a lot better than trying to do fancy but pointless stuff in your bot.

quaint wasp
#

Someone told me to watch no vds..

opal plank
#

that was me

umbral zealot
#

there's no vids there.

quaint wasp
#

Telling its a bad habit.

#

Yep..

umbral zealot
#

Those are written tutorials, not youtube tutorials.

opal plank
#

all those are docs

#

or tutorials

#

no videos

quaint wasp
#

there are vds IN them..

#

lol

umbral zealot
#

no

quaint wasp
#

I've been threw them.

#

litilary.

#

well.. Some of them have vds

blissful coral
#

Some of them have videos that are pertaining to the lesson

#

The rest are actual resources

quaint wasp
#

alr...

opal plank
#

the ONLY one that has videos, and i just checked, is codeacademy

#

which is intro videos

#

but the majority is written

quaint wasp
#

So umm.. The conclusion of this talk is..

@SmugTheKiler Dont fuck about the shards and your so fucking dumb. Get rid of the shards till your bot is in 1k servers, which we all know is not going to happen.

opal plank
#

that also has a video

quaint wasp
#

ok...?

opal plank
#

everything else is written

quaint wasp
#

But..

#

wait..

#

Thats not D.js

#

it .js

opal plank
#

its js not djs

#

js is the language

#

d.js is the library

blissful coral
#

d.js is a library

#

not a language

quaint wasp
#

no differency tho..

blissful coral
#

Yes

#

Big difference

earnest phoenix
#

Learn the programming language itself before trying to create applications on it

opal plank
#

You dont say a book is written in Harry Potter, you say its written in english

blissful coral
#

very big diff

umbral zealot
#

Just to be clear: what people meant by "don't watch videos" is "You can't learn javascript by watching 13 year old youtubers throw discord.js code at you.

quaint wasp
#

thats impossable..

blissful coral
#

No it isn't

opal plank
#

its the other way around smug

lyric mountain
#

also sharding 2k+

#

no 1k pls

solemn latch
#

I wish a book was written in Harry potter, not english.

opal plank
#

you're suppose to learn the LANGUAGE before using the library

#

discord bots are intermediate level projects

umbral zealot
#

@quaint wasp you're starting to sound like a really dumb troll at this point, where your only goal is to push us to annoyance. Just so we're clear, maybe you should, at this point, go take a walk.

lyric mountain
opal plank
#

you should get acquainted with the lang before

umbral zealot
#

Also @everyone please stop feeding the troll

lyric mountain
#

you can have many cars in one road

earnest phoenix
#

Anyone able to suggest a good CI tool such as buildbot?

lyric mountain
#

but it's still the same road

blissful coral
opal plank
mellow kelp
#

weeb

quaint wasp
opal plank
#

frick

mellow kelp
#

this guy takes everything seriously kek

umbral zealot
blissful coral
#

Ok this is going to far

#

Let's stop please

mellow kelp
#

yeah well

earnest phoenix
#

@blissful coral I just need something thats fast at building and has decent features

quaint wasp
earnest phoenix
#

KEKW Bruh

quaint wasp
#

I did everything... litilary.

mellow kelp
#

ah yes

#

the kira yoshikage life

earnest phoenix
#

something like jenkins or travis ci. but not jenkins or travis ci

#

I shall continue my search elsewhere

quaint wasp
#

indeed.

mellow kelp
#

good luck soldier

earnest phoenix
#

I think I might end up going with buildbot if I can't find anything

blissful coral
#

Bro

quaint wasp
#

alr. Sorry.

#

kinda got into gfs search

earnest phoenix
#

Usual troll on a daily basis

quaint wasp
#

girl

#

Why would I troll?

mellow kelp
#

bro

quaint wasp
#

really?

earnest phoenix
#

🗿

crimson vapor
mellow kelp
#

imagine how boring life would be without github PRs

crimson vapor
#

LOL

#

so boring indeed

mellow kelp
#

no cool features to accept

quaint wasp
#

PRs?

mellow kelp
#

no useless features to deny

crimson vapor
#

no funny commit messages

mellow kelp
#

"stuff"

#

"fix bug"

#

"test"

earnest phoenix
#

Smug, go take a break you won't know about these stuff

#

Or

#

Learn JS

crimson vapor
#

lol

mellow kelp
#

someone should make an entire repo with links to javascript guides

crimson vapor
#

someone has

earnest phoenix
#

I think someone actually did that

mellow kelp
#

that's pog

earnest phoenix
#

It had like 100 guide links or something

crimson vapor
mellow kelp
#

cool

nimble kiln
#

A tiny list limited to the best JavaScript Learning Resources
Very tiny

crimson vapor
#

this is on github

#

so does it count?

mellow kelp
#

perhaps

quaint wasp
#

Why github?

mellow kelp
#

why not github?

earnest phoenix
#

Github is life

blissful coral
#

github for life

mellow kelp
#

github is love

nimble kiln
#

Imagine using github at all

blissful coral
#

me

quaint wasp
nimble kiln
#

I edit my code on the live server through notepad++

mellow kelp
#

development enviroment 100

nimble kiln
#

Save > Done

crimson vapor
#

I edit my code on code-server then push to github

#

ezpz

mellow kelp
#

ez

nimble kiln
#

prod = dev environment

mellow kelp
#

imagine a world where the dev enviroment is also the production enviroment

nimble kiln
#

That's my world

#

And it works good

earnest phoenix
quaint wasp
#

@earnest phoenix at 9:25 PM
Github is life

@blissful coral at 9:25 PM
github for life

@mellow kelp at 9:25 PM
github is love

Responce: Umm... I feel sad for people that have no life in real world like yall...

blissful coral
#

What?

quaint wasp
#

sorry took long to set that up.

lyric mountain
#

my dude

earnest phoenix
#

What

crimson vapor
#

github is great

blissful coral
#

Huh

mellow kelp
#

what?

#

how is that even an insult

blissful coral
#

I am so confused

umbral zealot
#

are y'all not realising this guy's a troll that has nothing else to do

quaint wasp
#

People that stay in pcs for like hours a day..

lyric mountain
#

there are two kind of devs around the world:

  • Those who use git
  • Those who aren't devs
umbral zealot
#

Seriously stop even reacting to him

quaint wasp
#

why people mean to people that know less stuff

earnest phoenix
#

Act like he drank a minecraft invisibility potion

mellow kelp
#

great metaphor

quaint wasp
zenith terrace
#

@earnest phoenix

earnest phoenix
#

Still waiting for SimpleAST maintainers to merge PRs

#

@zenith terrace

nimble kiln
#

@nimble kiln #

quaint wasp
#

?

blissful coral
#

where the mods at

mellow kelp
#

y

quaint wasp
#

Umm... arnt you one?

#

nvm

lyric mountain
#

playing rocket league

blissful coral
#

no

quaint wasp
#

Playing twitch.

earnest phoenix
#

They're probably

#

gaming

quaint wasp
#

indeed.

mellow kelp
#

understandable

nimble kiln
#

They're passing around Slickers in #general

umbral zealot
#

This is starting to look way too much like #general

quaint wasp
#

True..

mellow kelp
#

um

quaint wasp
mellow kelp
#

should i shard at 1K or 2K guilds

blissful coral
#

2k

earnest phoenix
#

2.5K

mellow kelp
#

aight

blissful coral
#

thast

mellow kelp
#

development channel restored

blissful coral
#

that

umbral zealot
#

2k is where you should start, tbh.

blissful coral
#

yea

crimson vapor
#

my opinion is a bit lower

#

so you can prepare

#

with real testing

umbral zealot
#

The only reason you should consider it before is if your bot actually does use a lot of resources and you need to split the load.

mellow kelp
#

makes sense

nimble kiln
#

What speaks against internal sharding when you have enough ressources available?

lyric mountain
#

numbers maybe

lament rock
#

You could also shard earlier as a test of infrastructure so that you have plenty of time to figure everything out

earnest phoenix
#

Oh i got a #development question, why is enum still a reserved word in JS for about 5-6 years now

lyric mountain
#

enums are enums

blissful coral
#

is it still a reserved word?

#

Really?

umbral zealot
#

enum is used in typescript actually.

blissful coral
#

yea

quaint wasp
#

whats enum?

umbral zealot
#

There's loads of features still in JS that nobody in their right minds use

earnest phoenix
#

It's still reserved, never actually used or finished whatsoever

umbral zealot
#

like keywords:

#

which is like GOTO for JS

lament rock
#

private class fields

quartz kindle
#

svelte uses them

lyric mountain
#

idk if js has any use to it, but enums are useful af in java atleast

nimble kiln
# quartz kindle nothing

Noice. Cause for me it's way easier just adding one single option to my client than to figure out the other way 😄

quartz kindle
nimble kiln
#

ah so there's the "issue", ok good to know. Thx

umbral zealot
#

yeah seriously just #yolo it. ```js
const client = new Discord.Client({
shards: 'auto',
});

nimble kiln
#

^that's what I'm doing

quartz kindle
#

same

earnest phoenix
#

Auto shard gang

quartz kindle
#

im at 8k guilds and using ~5% cpu

nimble kiln
#

quartz kindle
#

so yeah, a single core can probably reach 50k+

lament rock
#

Clustering a bunch of internal shards together can reduce overall memory usage since there's overhead with constructing the client and the managers and also transferring cached data states via ipc

nimble kiln
#

Ok good I'll never hit those numbers, so I'm safe

blissful coral
#
if(client.guilds.cache.size === 1) client.options.shards = 1000000;```
earnest phoenix
#

I'm rocking 900 guilds a shard rn

quartz kindle
#

wat

earnest phoenix
#

its pretty pogger.

lament rock
earnest phoenix
quartz kindle
#

wat²

nimble kiln
quartz kindle
#

btw

#

i tested discord shard imits

nimble kiln
#

What were your findings

quartz kindle
#

they use 32 bit ints

#

you cant have more than 2147483647 shards

opal plank
blissful coral
#

uhhh I did === instead of =

#

LMAO

crimson vapor
#

im at 1

lament rock
#

I'd like to see a day where someone legitimately needs 2.17b shards

nimble kiln
earnest phoenix
#

Wait what

crimson vapor
earnest phoenix
#

Isn't the maximum amount of shards 1000?

nimble kiln
#

darn

crimson vapor
#

no

delicate zephyr
crimson vapor
#

at 1000 they ratelimit you

quartz kindle
#

why would it be 1000?

crimson vapor
#

big bots have more

lament rock
#

That's the max amount of identify calls you can make in 24h

nimble kiln
earnest phoenix
#

Hmm i guess

glossy spoke
lyric mountain
delicate zephyr
#

Rythm has 6,320 Shards minimum

quartz kindle
#

even if you didnt have your limits raised, nothing would stop you from logging in 1000 shards per day until you hit 2 billion

delicate zephyr
#

they're at 15.8 million

quartz kindle
#

it will just take you a few thousand years

lament rock
#

Once you reach that scale, you should already be able to test in prod without having to restart your gateway

#

There are ways to do it simply

delicate zephyr
#

im able to do that at 200 guilds

#

so

#

¯_(ツ)_/¯

#

its not hard to make things modular

lament rock
#

my point exactly

#

I'm a fan of worker threads

glossy spoke
crimson vapor
#

because expansion

#

LOL

#

isn't 0 shards the same as 1 shard?

lament rock
#

There is no such thing as 0 shards

delicate zephyr
#

A) I plan on spending money on ads to get my bot bigger
B) Experience in learning how to do so
C) Why not?

crimson vapor
#

well

#

no shards

#

is still one shard

blissful coral