#development

1 messages · Page 1376 of 1

tame kestrel
#

oh well

#

thank

earnest phoenix
#
@client.command(aliases= ["leaderboard"])
async def lb(ctx):
    if ctx.message.channel.id == 775495382016458772:
        with open("leaderboard.json", 'r') as json_file:
            pop = json.load(json_file)
        embed = discord.Embed(title = "Leaderboard", description = "This the leaderboard in the How Do Bot Support Server!")
        for item in sorted(pop.items(), reverse=True, key = lambda x: x[1]):
            idpop = int(item[0])
            points = int(item[1])
            user = await client.fetch_user(idpop)
            embed.add_field(name = f"User: {user}", value = f"How Do Points: {points}", inline = False)
        embed.timestamp = datetime.datetime.utcnow()
        embed.set_footer(text = f"{member.guild}", icon_url = f"{member.guild.icon_url}")
        embed.set_author(name = f"{member.name}", icon_url = f"{member.avatar_url}")
        embed.set_thumbnail(url=f"{member.avatar_url}")
        await ctx.send(embed = embed)        
    else:
        lbchannel = client.get_channel(775495382016458772)
        await ctx.send(f":warning~1: You can only run this command in {lbchannel.mention}.")

When I tried just doing it in a diff channel, it still didnt work

opal plank
#

JS
How would one use node-schedule to schedule a cron job that'll start on a specific time every 24h? say, cron jobs work based on local time, if i wanted to use UTC + 8 or some other format while my timezone is GMT - 2 or some other time, how would i set a cronjob to sync with another timezone?

sly wing
#

is it possible for the mimu bot to dm a pinged user

#

with a custom comman

earnest phoenix
#

Bob, what didn't work?

opal plank
#

@sly wing ask in the mimu support server

sly wing
#

send me the link

opal plank
#

you go on their top.gg website and get the link, or ask @spare goblet @sly wing

earnest phoenix
#

@earnest phoenix what's the problem? I didnt understand completely

#

it doesnt print anything

#

I think its because the embed has too many images

#

Max is 1 or 2, I can't remember

#

Look it up though, I'm not sure

opal plank
#
schedule.scheduleJob(`${convertedTime.getHours()} ${convertedTime.getMinutes()} * * *`,() => {});```
would this be valid for my previous question?
earnest phoenix
#

@earnest phoenix hope I helped

#

kk

#

thx

#

if(CommandCooldownList.indexOf(msg.author.id)) {

#

How can I check if a value exists in an array

#

ive tried tons of things like includes or indexOf but I get an error saying its not a function

opal plank
#

@earnest phoenix what is CommandCooldownList?

earnest phoenix
#

an array

#

var CommandCooldownList = {}

opal plank
#

thats not an array

#

thats an object

earnest phoenix
#

OH

#

WAIT

opal plank
#

arrays are presented with []

earnest phoenix
#

JS USES []

opal plank
#

xD

earnest phoenix
#

im used to languages where its {}

opal plank
#

i use that shit too with PG

#

it bothers me a lot

earnest phoenix
#

wait thats weird tho

#

howcome my dictionaries work

#

and they're defined as {}

opal plank
#

thats an object

earnest phoenix
#

js is weird

opal plank
#

key:value

#

the keys are those number

earnest phoenix
#

in lua its called a dictionary

opal plank
#

if you try rankers["128641987246123"] it will return true

earnest phoenix
#

yeah i know i know

opal plank
#

thats just an object in js

#

i havent dicked with lua much

#

best i know from lua was some scripts i made for openComputers for minecraft

earnest phoenix
#
bot.on('message', msg => {
    if(CommandCooldownList.indexOf(msg.author.id)) {
        if(msg.content.toLowerCase()==="") {
            msg.channel.send("")          
        };
    } else {
        
        setTimeout(() => {
            var CurrentElement = msg.author.id;
            CommandCooldownList.push(msg.author.id);
            setTimeout(() => {
                CommandCooldownList.splice(CurrentElement)
            }, 5000);
        }, 0);
    };
});```
#

wait why doesnt this work

#

Its supposed to be a command debounce

opal plank
#

are you using VSC?

earnest phoenix
#

yes

opal plank
#

good, i'd much rather teaching you how to debug rather than just feed you this one time

#

take a look at this

earnest phoenix
#

ok ill debug it

opal plank
#

trust me

#

click here

earnest phoenix
#

nothign there

opal plank
#

in the top

#

youll need to make one

earnest phoenix
#

that search bar doesnt appear for me

opal plank
#

are you using the newer version of VSC?

#

it looks outdated

#

or is that a theme?

earnest phoenix
#

does this look outdated

opal plank
#

well the debugger ran

#

so its fine

#

now do this

#

right next to the line you'll see that red ball

#

add that to where you want your script to pause

earnest phoenix
#

wait i know this from other ide's

#

yeah

opal plank
#

and then hover over the variables to see current real time values

#

step over is what you'll mostly commonly use

#

to follow the code

earnest phoenix
#

do what now

opal plank
#

basically add a breakpoint(the red ball in the gif) on the first line

 if(CommandCooldownList.indexOf(msg.author.id)) {```
#

now type something to trigger the bot, and it should pause the it on that line

#

then you click that button to see what the code is doing

#

and why its not going where it should be

#

you can hover over the variables to see their current value too

earnest phoenix
#

ok the script didnt stop

#
bot.on('message', msg => {
    if(CommandCooldownList.indexOf(msg.author.id)) {
        if(msg.content.toLowerCase()==="!twodoritos") {
            msg.channel.send("https://www.youtube.com/channel/UCk9BPJqFsMj8zbZ_KLDEgwg")          
        };
    } else {
        
        setTimeout(() => {
            var CurrentElement = msg.author.id;
            CommandCooldownList.push(msg.author.id);
            setTimeout(() => {
                CommandCooldownList.splice(CurrentElement)
            }, 5000);
        }, 0);
    };
});```
#

why isnt this else statement running

#

but the if statement does

opal plank
#

thats legit what i said dude

#

put a breakpoint

#

and trigger a command

earnest phoenix
#

wgat

opal plank
#

jsut type in a message and the bot should pick it up

earnest phoenix
#

that doesnt make sense ill just print debug

opal plank
#

bruh

#

omg

#

come video

#

i'll show you

earnest phoenix
#

no dude

#

i know how to do this

opal plank
#

just go

earnest phoenix
#

but its pointless

opal plank
#

you clearly dont

#

just go in general and watch my stream

earnest phoenix
#

yes u click red button and the thread pauses when it reaches that line

#

i know how to do it

opal plank
#

so whats the issue?

earnest phoenix
#

the else doesnt run

#

ill just print debug

opal plank
#

cuz its passing on the if

earnest phoenix
#

its easier for me

#

ok

#

but it isnt tho

#

the array is empty

#

wel

#

it is

#

but idk why

#

the array is empty

opal plank
#

did you populate the array?

earnest phoenix
#

no

opal plank
#

then theres the issue

earnest phoenix
#

what

#

i didnt populate it

#

so it shouldnt be passing

#

by populate do u mean add values

#

look debugging wont help

opal plank
#

use includes

earnest phoenix
#

this is a logic issue

#
bot.on('message', msg => {
    if(!CommandCooldownList.indexOf(msg.author.id)) {
        if(msg.content.toLowerCase()==="!twodoritos") {
            msg.channel.send("https://www.youtube.com/channel/UCk9BPJqFsMj8zbZ_KLDEgwg")          
        };
    } else {
        
        setTimeout(() => {
            var CurrentElement = msg.author.id;
            CommandCooldownList.push(msg.author.id);
            setTimeout(() => {
                CommandCooldownList.splice(CurrentElement)
            }, 5000);
        }, 0);
    };
});```
opal plank
#

dont use indexOf

earnest phoenix
#

then what do i use

opal plank
earnest phoenix
#
bot.on('message', msg => {
    if(!CommandCooldownList.includes(msg.author.id)) {
        if(msg.content.toLowerCase()==="!twodoritos") {
            msg.channel.send("https://www.youtube.com/channel/UCk9BPJqFsMj8zbZ_KLDEgwg")          
        };
    } else {
        
        setTimeout(() => {
            var CurrentElement = msg.author.id;
            CommandCooldownList.push(msg.author.id);
            setTimeout(() => {
                CommandCooldownList.splice(CurrentElement)
            }, 5000);
        }, 0);
    };
});```
#

im so confused

#

wait

#

i think i see what i did

#

ok yeah that was dumb

#
bot.on('message', msg => {
    if(!CommandCooldownList.includes(msg.author.id)) {
        if(msg.content.toLowerCase()==="!twodoritos") {
            msg.channel.send("https://www.youtube.com/channel/UCk9BPJqFsMj8zbZ_KLDEgwg")          
            setTimeout(() => {
                var CurrentElement = msg.author.id;
                CommandCooldownList.push(msg.author.id);
                setTimeout(() => {
                    CommandCooldownList.splice(CurrentElement)
                }, 5000);
            }, 0);
        };
    };
});```
opal plank
#

why you even settingTimeout with 0?

#

also stop using var

earnest phoenix
#

so i can make a new thread

opal plank
#

hmmm fair but still shouldnt clog

earnest phoenix
#

whats wrong with var

#

saves type

opal plank
#

it shouldnt really affect performance whatsoever

#

not quite

#

it leads to unintended bugs

#

since they are hoisted

earnest phoenix
#

oh like id getting interpreted as an int instead of a string, things like that?

opal plank
#

take this as example

#

even though im calling var before it event exists

#

it doesnt error

earnest phoenix
#

what is the difference between let and const

opal plank
#

which it should, cuz im calling a non existent variable

#

let is mutable/changeable

#

const, is constant, immutable, cant change

earnest phoenix
#

oh so if u plan on something being defined in a scope

#

u would define a let variable outside said scope

opal plank
#

yes

earnest phoenix
#

assuming u wanted it globally

opal plank
#

let and const are teh same, its just that one is variable and one isnt

#

dont do globals

#

it just pollutes workspaces

#

its top 5 shit NOT to do on js

earnest phoenix
#

How to make a bot dashboard

opal plank
#

vars also dont respect scopes which is a bother

earnest phoenix
#

Any idea

opal plank
#

with code

earnest phoenix
#

How

opal plank
#

css, html, ngix/apache/ vue/react/angular

earnest phoenix
#

; expected

opal plank
#

theres the kit, have fun learning that

earnest phoenix
#

what

opal plank
#

you dont need to declare string

#

if you like strong typed stuff, i'd recommend TypeScript

earnest phoenix
#

talking to me or the other dude

opal plank
#

you

earnest phoenix
#

no

#

i want to learn js

opal plank
#

ts IS js

earnest phoenix
#

Which code is best

#

then

opal plank
#

there isnt best code

earnest phoenix
#

whats the difference

opal plank
#

ts is strong typed js

#

see that String you trying to call?

earnest phoenix
#

yes

#

oh so like js but strict mode always on

opal plank
#

in js you do this

let string = 'abc'```
in ts you do
```ts
let Str:string = 'abc'
earnest phoenix
#

oh what

opal plank
#

you can annotate variables to a specific type

#

say you want str to ONLY have string in it, and dont allow any other type

#

if i were to try to do

let message.content = '!help'
message.content = {};


//somewhere else in code
message.content.startsWith() //errors
let message.content:string = '!help'
message.content = {} // errors, it doesnt let you assign anything other than a string to that variable

// rest of code is clear, no bugs
#

ts allows you to catch bugs like that beforehand

#

rather than debugging them in production

earnest phoenix
#

@opal plank we create my bot on Mobile . Do you want to check?

sudden geyser
#

is tha really valid

opal plank
sudden geyser
#

let message.content = "fnkdalsfsdf"

opal plank
#

no

#

it isnt

#

its just an example

earnest phoenix
#
setTimeout(() => {
                let CurrentElement = msg.author.id;
                CommandCooldownList.push(msg.author.id);
                console.log(CommandCooldownList[0])
                setTimeout(() => {
                    console.log("SPLICED")
                    CommandCooldownList.splice(CurrentElement)
                    console.log(CommandCooldownList[0])
                }, 5000);
            }, 0);```
#

i think im using splice wrong

#

the value stays in the array

opal plank
#

you could filter it too

earnest phoenix
#

@opal plank we create my bot on Mobile . Do you want to check?
Maybe you ignoring

sudden geyser
#

splice arguments:

  • the start index
  • how many to remove from there
  • the remaining args are the ones to at that index
opal plank
#

@earnest phoenix i have no idea what you meant

earnest phoenix
#

bruh

#

ok thats not what i want then

#

i just want to remove a value from an array

opal plank
#

filter((a) => a !== inputhere )

earnest phoenix
#

what

opal plank
sudden geyser
#

You could use it like: <Array>.splice(startIndex, 1).

Removes 1 element from the startIndex.

earnest phoenix
#

CommandCooldownList[CurrentElement] = null;

#

wait this should work

#

@sudden geyser no because multiple people may have their id in the array

opal plank
#

i find easier to use filter rather than get index and then splicing at that

earnest phoenix
#

bruh it didnt work

#

ill look into ur filter thing

opal plank
#

CommandCooldownList = Array.from(CommandCooldownList.filter((a) => a !== idhere))

#

that should work just fine

earnest phoenix
#

i miss lua where you could just do table.remove(tab,v)

opal plank
#

also

#

recommendation

#

use map and time values for that

#

rather than running that many setTimeouts()

#

user does command => date.now() + cooldown amount => map userid + when the date expires

on new command => if map has userid, and date.now() is higher than cooldown expire , run command and clear

#

its more efficient than running timeouts unecessarily if the user may not respond in hours

hollow sedge
#

I'm getting this error for a task that runs once an hour to fetch 10 users: discord.errors.HTTPException: 503 Service Unavailable (error code: 0): upstream connect error or disconnect/reset before headers. reset reason: overflow
anyone know why?

past sable
#

somehow my own bot managed to block me. anyone know why and how to get it to unblock me? im using discord.py

earnest phoenix
#

Wdym it blocked you?

sudden geyser
#

I'm getting this error for a task that runs once an hour to fetch 10 users:
anyone know why?
@hollow sedge it's a server error.

#

aka it's not your fault. It's the server's fault.

#

Discord was having issues recently.

hollow sedge
#

Oh ok

#

I just restarted my bot, thanks

earnest phoenix
#

@past sable you should make a command for it

past sable
#

i cant msg it

#

apparently bot accs cant actualyl block and stuff according to dpy docs

hollow sedge
#

I think that might require an intent

past sable
#

which intent

hollow sedge
#

Maybe just try the members one

earnest phoenix
#

Yeah how did it block you lmao

past sable
#

i have no idea

earnest phoenix
#

How do you know it blocked you

past sable
#

i cant message it

#

and clyde shows the blocked message

earnest phoenix
#

Anyone else can?

past sable
#

no idea

earnest phoenix
#

It might be you have DMs off

hollow sedge
#

Just bc you have DMs off doesn't mean you can't DM someone

past sable
#

my dms are always open

#

alright time to test the intents theory

hollow sedge
#

Well if clyde is sending you that message then it's probably something else

#

Doesn't hurt to try tho

earnest phoenix
#

Well, I tried DMing my bot as well

#

Didn't go well

opal plank
#

hmmm

earnest phoenix
#

But I have DMs off, so it doesn't prove anything

#

:(

opal plank
#

JS
I got a date converted into a specific timezone UTC + 8
and i can get my date locally(will be dynamic);

How can i get a conversion of date , so when the first UTC + 8 date is at 00:00 i get the equivalent in my time?

boreal iron
#

If both timezones won’t change u could use a non-dynamic way, just adding/removing the time difference in seconds from the timestamp and after convert the timestamp to a date-time format.

opal plank
#

@boreal iron they do change since they'll be used on different hosts across the world

#

so i need a dynamic way of doing this

#

the target is always the same, but the local will change

#

its basically sync'ing different hosts to run cron jobs at the same time

boreal iron
#

Then just use the date function to create the correct time for you.
Just add the offset to your time (string) and create a new time.

#

Like in the example

#

Adding GMT+ or - XXXX

#

The offset should show the difference to GMT

#

With that you can create a new date

opal plank
#

hmm im using UTC

#

actually

#

hold up

boreal iron
#

It’s called GMT previously

#

It’s just called UTC today

#

UTC isn’t a timezone just the so called world time

#

But = GMT

opal plank
#

hmmmmm

#

i got both dates already

#

which theres already a shitton of logic behind

#

but i cant get the difference

#

actually

#

hmmmm

#

this is what i got running

boreal iron
#

huh that’s not dynamic

#

And wrong anyways KEKW

opal plank
#

howcome?

#

@boreal iron

#

those 2 bots are in different timezones

#

target is the same on both cuz im converting it to UTC time with the offset

boreal iron
#

Yeah but the offset doesn’t match the actual time

opal plank
#

what time?

boreal iron
#

Any why 3600000 * 8?

opal plank
#

offset returns in ms

#

8 is hours

#

GMT + 8

#

which is that same time

#

well, now 30 minutes after i ran that command

boreal iron
#

Huh I thought u wanna get the local system and compare it to UTC

opal plank
#

like i said, i have a target UTC

#

and then i gotta match local based on target

#

im generating the target fine as you can see

#

the issue comes with getting when that target is at 00:00 and then converting it to local time

#

so i can run cron jobs

#

everytime target is at 00:00

boreal iron
#

Ah ok ur target in on UTC

opal plank
#

its a Date, yes

boreal iron
#

And local has get the offset

opal plank
#

could get UTC or GMT

boreal iron
#

Well speaking about timezones it would be GMT

pale vessel
#

🤓

#

fake rn

boreal iron
#

I still didn’t get why u would add 8 hours to the local time

#

I mean 60000 is correct, minutes to milli secs

#

May I actually didn’t read careful enough what u wrote okeh

#

fake rn
Shhh... just wanna make sure UTC is not a timezone. I’m not the police lel KEKW

#

Anyway gonna get some sleep

opal plank
#

i think i got it

#

fuck this shit, time manipulation is ass

#

screw that

full mortar
#

how can i find a user by their username with fetch in discord.js?

umbral zealot
#

You can't. fetch only supports IDs

full mortar
#

welp

#

so the only way to find a user by their username is with client.users.cache.get()?

umbral zealot
#

Not even, get() only takes ID too

#

you'd need find() on the cache

proper bolt
#

(await client.users.fetch()).find((u) => u.username === 'username')

#

if you need to fetch

#

otherwise use .find on .users.cache

umbral zealot
#

Ok but you won't be able to fetch all without the proper privileged intents so that's usually out of the question "just for finding a single user"

proper bolt
#

so enable it.

drifting wedge
#

how can i in python get whats only after a /?

umbral zealot
#

spoken like a true tiny bot owner without a verified bot 😂

drifting wedge
#

^ ignore

#

no need

proper bolt
#

is it really that bad

drifting wedge
#

i wont be needing it

proper bolt
#

i havent made any public bots in a while

drifting wedge
#

python =
python for ifs ==

js ===

my pp =======================

opal plank
#

1, verification needs time
2, if you already verified, you need to dm suport to get you intents that are priviledged. also takes time

umbral zealot
#

You can't enable them on verified bots without a good unique feature

drifting wedge
#

1, verification needs time
2, if you already verified, you need to dm suport to get you intents that are priviledged. also takes time
@opal plank mine was fairly fast

opal plank
#

i still cannot fathom that they verified my bot within 3 days

blissful coral
#

I have been waiting for over a week

#

on support

drifting wedge
#

they did mine in less than 24 hrs

blissful coral
#

To give me the intent I need

umbral zealot
#

The current intents request queue is over 2 weeks

proper bolt
#

so you cant just say i need to fetch all users in a server so i can search by username

#

or nickname

drifting wedge
#

The current intents request queue is over 2 weeks
@umbral zealot na

opal plank
#

not even evie

drifting wedge
#

i got a response in like a day

opal plank
#

3 days

umbral zealot
#

No no, privileged intents queue

opal plank
#

again

drifting wedge
#

ye

opal plank
#

i requested both

#

3 days ago

blissful coral
drifting wedge
#

i got response for intents in a day

proper bolt
#

i should probably verify my bots

#

havent done that yet

umbral zealot
#

that's interesting. because it still says it's way over 4-5 business days

#

you guys are shpechial

opal plank
#

thats probably an estimate or super luck

umbral zealot
#

they asked for more info, clearly

#

no?

opal plank
#

dunno about extreme, mine definetly went thru within 3 days

#

no questions either

blissful coral
#

EVie

opal plank
#

just straight up approved

blissful coral
#

I sent them a thing

#

With all of my bot info

umbral zealot
#

weird

blissful coral
#

And then

#

They responded

#

Asking for the exact same stuff

#

Then I waited 2 days

#

and finally got a response

#

Now I am waiting again

umbral zealot
#

Oh, you're still waiting

blissful coral
#

Yeah

umbral zealot
#

so it's not done then

#

Which means... that's what takes (last I heard) about 13-17 days

opal plank
#

3 days basically

#

no middle steps either, just filled everything in the portal

umbral zealot
#

That is a verification request, not an intents request

opal plank
#

well yeah

#

verification

umbral zealot
#

Bot verification is not the same queue

opal plank
#

which includes intents

umbral zealot
#

we were talking about adding intents to an existing verified bots.

opal plank
#

oh, then no

#

i already requested both out of the bo

umbral zealot
#

Great, now that we've established that two people that said "adding intents is super fast" were not, in fact, adding intents (or don't have them already), I'm still confirming that if you have an existing bot, that is currently verified, the process to add missing privileged intents is still, in fact, about 2 weeks, due to a very large request queue.

earnest phoenix
#

is it possible to do stars

opal plank
#

i also preemptively requested for message_content intents in the request, im amazed i didnt get any laughs from that

earnest phoenix
#

without it doing the italic thing

#

**

#

like that but alot more

#

from a script

umbral zealot
#

escape them with backslashes. ******

earnest phoenix
#

ok

blissful coral
#

***Do this***

earnest phoenix
#

still does it

umbral zealot
#

in JS, you have to double-backslash because the backslash itself is an escape character in JS

earnest phoenix
#

So like

#

\\\*\etc...

#

bruh

#

Wtf

#

****\

#

um

#

Ur method doesn’t even work with typing

umbral zealot
#

Why do you think I took a screenshot

earnest phoenix
#

*****\

umbral zealot
#

this works perfectly fine

earnest phoenix
#

That’s what I’m doing

umbral zealot
#

And that works great

earnest phoenix
#

****\

#

nope

#

Wait

umbral zealot
#

it really does

earnest phoenix
#

Wait it is lmao

umbral zealot
#

you have 4 stars there

earnest phoenix
#

*****

#

ok cool

umbral zealot
#

there ya go

earnest phoenix
#

Ok so

#

in Js I gotta do that?

umbral zealot
#

yes. Except you're missing a * at the end

#

because that's, y'know, what you're escaping. the asterisk 😛

earnest phoenix
#

lol what it has a name

#

I always just called it star symbol

umbral zealot
#

yep, that is the asterisk.

silk yew
#

\\\\

#

Tf

#

****\

#

What?????

#

Ohhhhhh

#

I get itttt

#

Ohhhhh

#

Ok

earnest phoenix
#

******

viral spade
#

discord.js.
how can i know which emoji was used in a messageReactionAdd ? the name is shown as '?'. I need to do something only if a certain emoji of the form ':emoji:' was used. How can i check for that?

earnest phoenix
#

uh

#
msg.author.send(`**\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\***\n> Byte Memory Usage: ${process.memoryUsage().heapUsed}\n> Bot Uptime:\n> Seconds: [${Math.floor(bot.uptime/1000)}]\n> Minutes: [${Math.floor(bot.uptime/1000/60)}]\n> Hours: [${Math.floor(bot.uptime/1000/60/60)}]\n> Days: [${Math.floor(bot.uptime/1000/60/60/24)}]**\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\***`);```
#

is there a way to do like repeated string patterns

#

because uh

#

just look above

viral spade
#

loops

sonic lodge
#

you can also use string.repeat()

strong tundra
#

you can hardcode it and use it when you format

#

idk

dusky mason
#

does anyone know why on_ready take so long to fire?

#

my on_ready function is run after an hour

upper elm
#

so I'm looking into using Heroku as a bot host/data management, so I'm wondering if Heroku Postgres or Redis would be better for me, I'm looking for a place to store data for users which can be quickly accessed and changed

dusky mason
#

of startup

upper elm
#

and sorry i use discordjs

earnest phoenix
#

"\\*".repeat(30)

#

ty, this is alot easier than what i had before

strong tundra
#

i'd probably say postgres

#

unless you want like super incredibly fast

upper elm
#

like a currency system

dusky mason
#

nvm

#

fixed it

upper elm
#

anyway thanks

dusky mason
#

I know it's my intents

#

but the members is on

drifting wedge
#

?

dusky mason
#

the intents thing

drifting wedge
#

How can I help?

dusky mason
#

how do we fix this again?
@dusky mason

drifting wedge
#

Give deets

earnest phoenix
#

what library are you using

drifting wedge
#

Lang, and all the shit

dusky mason
#

py

drifting wedge
#

Ok that’s my area

dusky mason
#

here's code

drifting wedge
#

What code?

dusky mason
pale vessel
#

"here's code"

dusky mason
#

well of the intents

pale vessel
#

kekw

viral spade
#

discord.js.
how can i know which emoji was used in a messageReactionAdd ? the name is shown as '?'. I need to do something only if a certain emoji of the form ':emoji:' was used. How can i check for that?

dusky mason
#

but as u saw

#

it's not 39 members

drifting wedge
#

Members

#

How do u get members?

earnest phoenix
#

yes, d.py screws the server members

dusky mason
#

so it's not fixable?

earnest phoenix
#

it did work well before

#

either something with the library or the api

drifting wedge
#

HOW DOC U GET MEMBERE?!

#

Your activity can’t be the servers member count

#

Not how it works

earnest phoenix
#

hey

#

it actually worked before

drifting wedge
#

How did u get the members?!!!!!

earnest phoenix
#

discord. Intents. all()

dusky mason
#

yeah

earnest phoenix
#

i think it's that one

drifting wedge
#

The members var doesn’t exist

dusky mason
#

it worked perfectly fine

#

5 minutes ago

#

but the problem was the on_ready took 1 hour

drifting wedge
#

What did u change?

dusky mason
#

so loss for loss

#

i just updated from 1.4 to 1.5

drifting wedge
#

Ehh imma go sleep

earnest phoenix
#

i am still on 1.2 hehehe

pale vessel
#

w h a t

#

that's old

sick fable
#

What are COGS?

#

🥺

steep socket
#

It's individual files that combine to make a single bot

dusky mason
#

my bot randomly spews this

#

im editing a message

#

and it says this right after the edit

#

here is the code

#

message = await ctx.send('`Beginning Downloader...`') await ctx.send(message) await asyncio.sleep(.7) embed = discord.Embed(title="Click To Go To Downloader", url=f'{url}', timestamp=ctx.message.created_at, color=0x2F3136) embed.set_footer(text=f"Requested by {ctx.author}", icon_url=ctx.author.avatar_url) await message.edit(content='', embed=embed)

#

mb im a fucking idiot

#

i added

#

that stupid await ctx.send again

normal sage
rocky hearth
pale vessel
#

no

normal sage
#

@rocky hearth just use dms

rocky hearth
#

Hmmm, but that feature would be cool. If they let us to use.

sick fable
#

If you really know photo editing or whatever it is using py or js. Then it's possible

proper bolt
#

what would photo editing have to do with anything

hazy sparrow
#

how do i remove the 8ball in the question section thingy below THE 8-BALL HAS SPOKEN

rocky hearth
proper bolt
#

nice, no code given, and your question makes no sense

hazy sparrow
#

ok so what i want is that in the description it says "question: 8ball test test test test test" but i want it to say "question: test test test test test"

earnest phoenix
#

hi

#

but i can't seem to do: npm install Discord.js

hazy sparrow
earnest phoenix
#

how do i remove the 8ball in the question section thingy below THE 8-BALL HAS SPOKEN
@hazy sparrow splice it out from args OR substring message.content

#

@earnest phoenix can you stop flooding chat with embeds

#

ok

hazy sparrow
#

@earnest phoenix go to the command promt of your bot folder and type npm i discord.js

earnest phoenix
#

but i can't seem to do: npm install Discord.js
@earnest phoenix you have to run it in the terminal NOT in your javascript code

#

also discord.js should be lowercase

hazy sparrow
#

^

#

@earnest phoenix it says args.splice() is not a function

earnest phoenix
#

args is an array?

hazy sparrow
#

no

earnest phoenix
#

then do the second method

#

substring out 8ball

#

ik ik i ran in the folder with cd "foldername" i also checked for a firewall... @earnest phoenix

hazy sparrow
#

i didnt understand that KEKW

earnest phoenix
#

message.content.substring ("whatever part you want to remove".length);

hazy sparrow
#

noice

#

ty

earnest phoenix
#

ik ik i ran in the folder with cd "foldername" i also checked for a firewall... @earnest phoenix
@earnest phoenix can you screenshot the errors in the terminal

#

sure...

#

i will

#

ohhh... i'm running on a vpn smh

#

well thanks @earnest phoenix

open obsidian
#

hey can someone help in discordbot development? I can't find the "Server Welcome" function ; when someone adds our bot, it should send message: Thanks for adding me in your server...

earnest phoenix
#

lmao send the screenshot here

#

hey can someone help in discordbot development? I can't find the "Server Welcome" function ; when someone adds our bot, it should send message: Thanks for adding me in your server...
@open obsidian there is no definete function for that you have to build it yourself

open obsidian
#

@open obsidian there is no definete function for that you have to build it yourself
@earnest phoenix ok thanks

silver lintel
#

bc this doesnt work for some reason

earnest phoenix
#

join both of them then compare the strings

silver lintel
#

so array.join("")?

earnest phoenix
#

arr1.join("") == arr2.join("")

#

so array.join("")?
@silver lintel what is ternary doing here yes

sonic lodge
#

or loop through the arrays and compare elements one-by-one

silver lintel
#

okay thanks, and how would i compare strings like [1, 2, 3] and [1, 3, 2], to see if they have the same things but not in the same order

earnest phoenix
#

or loop through the arrays and compare elements one-by-one
@sonic lodge that's possible but that'll take a fucking long time to do

sonic lodge
#

ig

earnest phoenix
#

okay thanks, and how would i compare strings like [1, 2, 3] and [1, 3, 2], to see if they have the same things but not in the same order
@silver lintel sort both those strings using the same sorter

#

then compare

#

*actually reject the joining part just sort the arrays

silver lintel
#

oh yea, forgot abt that :/

#

thanks

earnest phoenix
#

arr1.sort () === arr2.sort ()

static saffron
#
dbl.hasVoted(message.author.id).then(a => {
   if(!a){
   return message.channel.send(`Hey, it seems like you have not voted me from the past 12 hours, this command is limited to voters only`)
            }
        })
message.channel.send("some message")``` why does it send both message?
sonic lodge
#

the second send() is outside the function

static saffron
#

thanks

earnest phoenix
#

peace out boys gtg attend online class

hazy sparrow
#

@earnest phoenix now it says "I test test test test test" instead of "8ball test test test test test"

sonic lodge
#

what's going on here
const args = message.content.slice(prefix.length).slice("ball").trim().split(" ").join(" ");

#

that .slice("ball") does nothing

earnest phoenix
#

bruh

hazy sparrow
#

yeah i made it to .substring("8ball".length)

earnest phoenix
#

i meant this:

let question = message.content.substring("bow 8ball".length);
silver lintel
#

whats empty character? /200b?

hazy sparrow
#

well what i made works too

#

¯_(ツ)_/¯

earnest phoenix
#

whats empty character? /200b?
@silver lintel \u200b with the backslash

#

also it's called zero width space not empty character

silver lintel
#

oop

#

ty

earnest phoenix
#

well what i made works too
@hazy sparrow no it does not

silver lintel
#

hello, i have a verified bot, and how do i change this to the number of servers?

sonic lodge
silver lintel
#

how?

sonic lodge
grim moss
#

Hi

marble ruin
#

Hello

earnest phoenix
#

Hello

#

at Array.forEach (<anonymous>)
at C:\Users\Administrator\Desktop\CalypsoBot-develop\src\Client.js:121:13

#

Help Me

#
      this.logger.info(`${files.length} event(s) found...`);
      files.forEach(f => {
#

@sonic lodge @silver lintel Help Pls

#

"path": "/channels/774041136934551584/messages",
"code": 50035,
"httpStatus": 400,
"stack": "DiscordAPIError: Invalid Form Body
embed.image.url: Not a well formed URL.
at RequestHandler.execute (C:\Users\Administrator\Desktop\CalypsoBot-develop
ode_modules\discord.js\src\rest\RequestHandler.js:170:25)
at processTicksAndRejections (node:internal/process/task_queues:93:5)"
}
2020-11-09 22:54:21 - error [app.js]: Invalid Form Body
embed.image.url: Not a well formed URL.
{
"name": "DiscordAPIError",
"method": "post",
"path": "/channels/774041136934551584/messages",
"code": 50035,
"httpStatus": 400,
"stack": "DiscordAPIError: Invalid Form Body
embed.image.url: Not a well formed URL.
at RequestHandler.execute (C:\Users\Administrator\Desktop\CalypsoBot-develop
ode_modules\discord.js\src\rest\RequestHandler.js:170:25)
at processTicksAndRejections (node:internal/process/task_queues:93:5)"
}
2020-11-09 22:54:35 - debug [app.js]: [WS => Shard 0] [HeartbeatTimer] Sending a heartbeat.
2020-11-09 22:54:35 - debug [app.js]: [WS => Shard 0] Heartbeat acknowledged, latency of 119ms.
2020-11-09 22:54:51 - error [app.js]: Invalid Form Body
embed.image.url: Not a well formed URL.
{
"name": "DiscordAPIError",
"method": "post",
"path": "/channels/774041136934551584/messages",
"code": 50035,
"httpStatus": 400,
"stack": "DiscordAPIError: Invalid Form Body
embed.image.url: Not a well formed URL.
at RequestHandler.execute (C:\Users\Administrator\Desktop\CalypsoBot-develop
ode_modules\discord.js\src\rest\RequestHandler.js:170:25)
at processTicksAndRejections (node:internal/process/task_queues:93:5)"
}

#

Add

manic osprey
#

hello

earnest phoenix
earnest phoenix
#

@earnest phoenix you described your problem very badly can you explain it better

#

And why are you sending discord.js's source code

sick fable
#

Can someone please help me regarding gif's? I want to set the embed image of my bot but it's not displaying the image

earnest phoenix
#

Can someone please help me regarding gif's? I want to set the embed image of my bot but it's not displaying the image
@sick fable embed image of bot wdym?

sick fable
#

I want the bot to send embeds and I want that image into the bot

#

But it's not showing it

#

It's a gif

earnest phoenix
#

???

#

so get the image from a link embed then set it as bot avatar?

sick fable
#

so get the image from a link embed then set it as bot avatar?
@earnest phoenix you won't understand it. I have a test server with only two members where I test my bot commands before releasing it. Maybe join it and I'll let you know. I am confused lol

#

No don't join lemme send ss

earnest phoenix
#

ads blobcatban

sick fable
#

See

#

The image isn't showing

#

I want it to show the gif from tenor or Giphy or Imgur

earnest phoenix
#

send the embed code here

#

and how you are fetching it from tenor or giphy or imgur

solemn jolt
#

Why i get this error when i Deploy in heroku?

earnest phoenix
#

@solemn jolt because your quota is exhausted

#

PLEASE STOP USING HEROKU

solemn jolt
#

@earnest phoenix ok iam stop

#

@earnest phoenix how i can get another whit out heroku?

earnest phoenix
#

read the pins

sick fable
#

and how you are fetching it from tenor or giphy or imgur
@earnest phoenix I am just copying the link of those gif's

#

And pasted it in the embed code

earnest phoenix
#

send the embed code then

gentle lynx
#

how can i get a link for the avatar of a user with a gif?

#

is there like a npm package for that

#

in discord.js btw

pale vessel
#

you don't need an extra package for that lol

#

you can use user.displayAvatarURL({ dynamic: true })

gentle lynx
#

yup i googled it

#

thanks

summer acorn
#
client.on('guildMemberUpdate', (oldMember, newMember) => {
    if (newMember.guild.id == "724602779053719693") {
        console.log("a");
        require('./expirePremium.js')(client, oldMember, newMember, fact);
    }
});

this isn't emitting for some reason. I also tested console logging outside of the if statement, but nothing ever got logged even on a guildMemberUpdate.

#

There are no errors, it just doesn't get emitted.

pale vessel
#

but you do have the guild members intent, correct?

#

if not then you should add it

summer acorn
#

It does not have the guild members intent, but that's a privileged intent which I do not have access to.

#

although, I do get guildMemberRemove and guildBanAdd

feral furnace
#

Guys i have a question, is google cloud or amazon web services good for bot hosting?

#

i can say microsoft azure also

#

do you guys have an idea about these?

summer acorn
#

oh wait actually I guess I don't get guildMemberRemove

#

well then, time to contact support I guess

pale vessel
#

yeah

jagged sun
#

Hey, a small question: I bet some of you are also using pm2 to daemonize their discord bot written with discord.js. Is there a way to create an error log that shows only exploiting errors, not exceptions?

ivory seal
#
            console.log(channel);
            if(channel.type==="category" && channel.type==="voice"){
                return;
            }else{
                console.log(channel)
                channel.createWebhook('test')
            }
    
        })``` i am getting the error ``channel.createWebhook is not a function`` . Can someone help me figure this out
pale vessel
#

you should change it to just if (channel.type !== "text") return;

earnest phoenix
#

@ivory seal voice channels

ivory seal
#

kk

#

gime a sec

pale vessel
#

that forEach looks sus tho

#

it could be api abuse

ivory seal
#

oh

earnest phoenix
#

bruh that if statement's condition is wrong

#

You can't create webhooks for categories

#

Or voice channels

ivory seal
#

ye its supposed to be if(channel.type != "text")return;

earnest phoenix
#

NOT EQUAL TO

#

that will ignore all text channels

#

oh wait

#

I'm dumb

ivory seal
#

ye lol

#

lol

earnest phoenix
#

also you don't need an else on an if that has a return

#

the function will end anyways

ivory seal
#

ye ik

#

but flaze is right, might end up in api abuse so i'll just do another thing

feral furnace
#

Guys, what should be the minimum features of the server I will use for the discord bot

#

Can someone help me please

boreal iron
#

There are no requirements to invite a bot.

#

Some bots probably need permissions to handle stuff but this has nothing to do with the server in general.

zealous sable
boreal iron
#

Bet we’re both wrong and he meant something completely different KEKW

zealous sable
#

Nah it’s fine

pearl briar
boreal iron
#

Can’t open that link
But u declare the interval first and clear it after.
let timer = setInterval... clearInterval( timer );

pearl briar
#

@boreal iron

    client.on('message', async message => {
        if (message.channel.id !== '741602504881602561') return
            for (let embed of message.embeds) {
                if (message.embeds[0].description.includes("tes")) {
                \\ so something

                var i = 20;
                var interval = setInterval (function () {
                        i = i - 2;
                    if (i == 0) {
                        // do something
                        
                    } 
                    if (i > 1 && i < 5) {
                        // do something
                        
                    }
                        if (i > 4 && i < 11 ) {
                        // do something
                        
                    }
                        if (i > 10) {
                        // do something

                    }
            }, 2000);
        }
        if (message.embeds[0].description.includes("tes2")) {
            clearInterval(interval)

        }
    }
})
earnest phoenix
#

Im not going send my script because I feel this could just be resolved with advice

#

But how do I fix this

#

It’s not live

#

If u type a dm it sends u the message

#

I don’t want it to stack like that

#

I want it to reset so <60 seconds,minutes

gusty quest
#

can someone help me to make ship command but in canvas i want to look like this ?

earnest phoenix
#

and <hours

#

Wait would I do like for seconds

#

seconds = uptime() / 1000 / Math.clamp(uptime() /1000 /60)

#

that might work ?

#

hey i need help

#

i made ban and mute command

#

but idk how to make tempban and tempmute command, help ms pls

earnest phoenix
#

What language

#

Are you using

gentle oxide
#

I don't understand the error keeps getting Error: (Command raised an exception: Forbidden: 403 Forbidden (error code: 50013): Missing Permissions)

pearl briar
#

btw can i detect my member who vote the server?

#

I don't understand the error keeps getting Error: (Command raised an exception: Forbidden: 403 Forbidden (error code: 50013): Missing Permissions)
@gentle oxide missing permission, set to administrator for test, thats works or no

gentle oxide
#

I don’t understand

#

what do you mean?

summer acorn
woven burrow
#

How do I write red text in top.gg but description

#

*bot description

earnest phoenix
#

how i can do that?

anyFunction({
  { },{ },{ }
})```
result:
```[
  { }, { }, { }
]```
#

🥺

gentle oxide
#

I don't understand the error keeps getting Error: (Command raised an exception: Forbidden: 403 Forbidden (error code: 50013): Missing Permissions)

Help me pls

earnest phoenix
#

@gentle oxide you don't have permissions to execute that

woven burrow
#

Yooo help?

earnest phoenix
#

How do I write red text in top.gg bot description
@woven burrow CSS

#

try doing <p style="color: red;">text</p>

woven burrow
#

Oki

earnest phoenix
#

how i can do that?

 anyFunction({
   { },{ },{ }
 })```
result:
```[
   { }, { }, { }
]```
help? ![angeryBOYE](https://cdn.discordapp.com/emojis/588492565712601109.webp?size=128 "angeryBOYE")
rocky hearth
#

wat do you want?

#

do u want ur function to return that?

#

@summer acorn No that's totally illegal

gentle oxide
#

@gentle oxide you don't have permissions to execute that
@earnest phoenix
Why

earnest phoenix
#

guild role permissions

neon heart
#

how to fix error 429 (too many request) from yt api?

magic jackal
#

Anyone good with VMWare ESXi?

Getting the following error from CIM module.

sfcb-vmware_raw[74006]: IpmiIfcSelGetInfo: IPMI_CMD_GET_SEL_INFO cc=0xc1

#

Seems to happen with the daemon restarting for SFCBD-watchdog

earnest phoenix
#

how i can do that?

 anyFunction({
   { },{ },{ }
 })```
result:
```[
   { }, { }, { }
]```
help? ![angeryBOYE](https://cdn.discordapp.com/emojis/588492565712601109.webp?size=128 "angeryBOYE")

@earnest phoenix The first one you showed is incorrect syntax

#

Or you just want to get the properties?

#

yes

#

Object.entries(<object>)

steep socket
#

@earnest phoenix you can

#

oops wrong virgil

#

sorry

#

@earnest phoenix yes you can

#

as long as u have all the dependencies i dont see why not

zealous sable
#

Why tho seems a bit strange running your bot multiple times

gentle oxide
#

Error: (Command raised an exception: TypeError: not all arguments converted during string formatting)

steep socket
#

I have idea to allow my code to allow owners can change avatar and name of bot then i need more tokens for each server
@earnest phoenix just let them self host, your computer wont survive much

#

or is it not open source?

#

why do i assume every thing is open source

zealous sable
#

that would mean you are making a new bot per server?

#

Just to change the avatar

dusky sundial
#

@gentle oxide can you send the code that causes the error, please?

steep socket
#

Just to change the avatar
@zealous sable apparently

zealous sable
#

yes but you are still making a new bot per server

#

which is not very productive

steep socket
#

first of all, that could be considered api abuse

gentle oxide
#

@gentle oxide can you send the code that causes the error, please?
I send it to you private

steep socket
#

second of all, dont dream of ur bot ever getting verified

blissful coral
#

Send it here

tiny bough
#

Hello, can anyone assist me in creating webhooks? I need to create one and i'm pretty beginner at this. I need it for the top.gg webhook

zealous sable
#

You are talking about if a user wants to change the avatar they need to add a whole new bot

dusky sundial
#

@gentle oxide it's better if you send it here so multiple people can try to help

steep socket
#

does the avatar really matter that much?

tiny bough
#

I have a bot hosted at Pebblehost, and I have no idea how I can make webhook for my bot there to receive from top.gg

steep socket
#

i just made my bot open for anyone to modify and host it instead of running 300 bots at once

gentle oxide
#

Ok

woven burrow
#

Wait

steep socket
#

i cant see anything

zealous sable
#

Vergil you know that you wont be able to list the bot, you wont be able to verify the bot etc

woven burrow
#

Is that correct?

dusky sundial
#

Uh.. I think a screenshot or copy-paste would be better? 😂

#

Is that the code that causes the error you sent?

zealous sable
#

How many server are you planning on using this in tho.. say you had 10k servers all wanting a custom avatar

#

Thats not gonna be possible to manage

steep socket
#

hmm should i profit from my bot

#

i told my self i would enevr do that

#

its tempting

dusky sundial
#

Personally, I just added a donate command so people who want to help can send a little tip

steep socket
#

good idea

#

i hate premium bots and stuff

zealous sable
#

but how would you manage that vergil

#

10k servers wanted a custom avatar you would need to create 10k different bots?

#

Which idk if thats even possible on discord dev website

steep socket
#

help me
@gentle oxide what error does it show

dusky sundial
#

If people want to get paid for their work, I guess it's fine. But I wouldn't expect a lot unless it's a really cool and unique bot

solemn latch
#

One command pog.

steep socket
#

i will always keep my bot foss

zealous sable
#

How are you making, inviting and managing for example 500 bots on one command when each one is a DIFFERENT bot

steep socket
#

^^

gentle oxide
#

when I execute the command with the bot with permission 0 on a server I get this error

dusky sundial
#

Error: (Command raised an exception: TypeError: not all arguments converted during string formatting)
@gentle oxide
This was the error that his code raised, supposedly

gentle oxide
#

I don't understand the error keeps getting Error: (Command raised an exception: Forbidden: 403 Forbidden (error code: 50013): Missing Permissions)

dusky sundial
#

Or not?

worthy pine
#

@gentle oxide the bot doesnt have perms

steep socket
#

I don't understand the error keeps getting Error: (Command raised an exception: Forbidden: 403 Forbidden (error code: 50013): Missing Permissions)
@gentle oxide that means ur bot doesnt have proper perms

zealous sable
#

You dont just add tokens tho

#

One bot can only login once

#

onm the same host code or whatever you wanna call it

dusky sundial
#

Yeah, that means your bot doesn't have permissions to send messages in the text channel you're trying to use it in

quartz kindle
#

You can create multiple clients

#

But if your bot crashes, all bots do

tiny bough
#

Anyone can help me how I can set up webhook top.gg integration? I can't use Discord webhook on it

worthy pine
#

its a self hosted webhook or something @tiny bough

tiny bough
#

@worthy pine yes that's my question, like is there a package that easily creates a self hosted webhook sort of in discord js

quartz kindle
#

Yes

#

dblapi.js

tiny bough
#

Ohh yea, but my problem with that is it asks for discord bot token,

gentle oxide
#

@gentle oxide that means ur bot doesnt have proper perms
@steep socket

And how do I put the permission because with the other commands if it works for me I do not understand why it does not work with this one

tiny bough
#

but i plan to use the webhook for my server

steep socket
#

just add the permiossions in the dev page and re invite the bot

quartz kindle
#

@tiny bough you dont need the token for the webhook

tiny bough
#

ohh

worthy pine
#

@tiny bough so you want to make a webhook using a bot to send message through it? or no?

quartz kindle
#

No they want to receive top.gg votes

tiny bough
#

i need a webhook that will receive whether a user has voted within 12hrs

#

so i can reward sort of

gentle oxide
#

but if the bot when they add it here to this server they put it with permissions 0 they will get the error

solemn latch
#

Also, it doesn't help when you ask your question you ask it everywhere.
I your question was answered in api aswell.

gentle oxide
#

the bot had administrator permission etc and they have denied me because it did not recognize that command

zealous sable
#

Noel, bots arent added here anymore

tiny bough
#

here's where i'm confused. using webhooks but it ask for yourDLBToken

quartz kindle
#

The token is not required for webhooks

#

You can pass false or null to jt

tiny bough
#

ohh so the DBL is like a password that is optional am i corec?

quartz kindle
#

The dbltoken is for the top.gg rest api

#

For stuff like getting the last 1000 votes

#

Or post server count

gentle oxide
#

Noel, bots arent added here anymore
@zealous sable

as they are not added to this server if I am registered in top.gg

zealous sable
#

Yes no bots are added here anymore, you can still add your bot to the website top.gg but they are not added to this discord

quartz kindle
#

They are still tested tho

zealous sable
#

Yes they are tested of course

#

But no longer added here.

tiny bough
#

ok so i have this code:

const DBL = require('dblapi.js');
const dbl = new DBL('', { webhookPort: 5000, webhookAuth: 'password' });

dbl.webhook.on('ready', hook => {
console.log(Webhook running at http://${hook.hostname}:${hook.port}${hook.path});
});

quartz kindle
#

So you need to check for permissions and send an error message if the user donest have them

tiny bough
zealous sable
#

Yes ^ what Tim said

#

Very important

solemn latch
#

Input the correct ip

zealous sable
#

0.0 etc isnt the IP

solemn latch
#

0.0.0.0 is a placeholder for the proper ip

quartz kindle
#

@tiny bough where is your code hosted?

tiny bough
#

at pebblehost

quartz kindle
#

Do they give you an ip address?

zealous sable
#

Pebble host show you the IP you can use for DNS etc

#

thats the one you can use instead of the placeholder

tiny bough
#

ohh wait in this code:
const DBL = require('dblapi.js');
const dbl = new DBL('', { webhookPort: 5000, webhookAuth: 'password' });

where do i put the IP

#

i'm really lost in dbl

quartz kindle
#

@tiny bough the ip goes on top.gg

#

Not in the code

zealous sable
#

Change that IP

#

with your hosts IP

quartz kindle
#

And dont forget the authorization password

tiny bough
#

oh ok ok i'll try that first thanks!

solemn jolt
#
const entry1 = await guild .fetchAuditLogs({ type: "MEMBER_KICK_ADD" })

Why this code is don't work?? In v12

earnest phoenix
#

Node?

#

Js?

solemn jolt
#

Yes

earnest phoenix
#

Discord?

solemn jolt
#

Yes

earnest phoenix
#

Which

solemn jolt
#

Discord.js

earnest phoenix
#

Lmao

woven burrow
#

How to color text in html coding

solemn latch
#

Using css

woven burrow
#

H

solemn latch
rocky hearth
#

have anyone used oh-my-zsh??

woven burrow
steep socket
#

how do i check if a json value is null using aiohttp

#

;-;

#

nvm

#

an nsfw subreddits to test my bot filter? nothing too bad pls

solemn latch
#

r/nsfwtest

#

Nah probably not a thing

steep socket
#

the bot filter works

#

well kinda

#

it throws an exception when there is nsfw content

#

but i got the intended result lmao

solemn latch
#

Lmao

#

Flawless

steep socket
#

yes

#

shh

#

for some reason it only says key error data when its nsfw

#

so i am confusion

#

¯_(ツ)_/¯

#

is there a way to activate google safe search from the url?

#

have anyone used oh-my-zsh??
@rocky hearth ye its great

rocky hearth
#

Ooh, how can I make it to not show the directory path

steep socket
#

i think so

#

idk how tho

#

wait

rocky hearth
#

I only want to show the root folder, I'm working on

steep socket
#

oh ok

#

i thikn this can help

#

the theme doesnt change anything dw

#

just add this to ur theme file

#
prompt_dir() {
  prompt_segment blue black '%c'
}```
#

change blue black to anything

tame walrus
#

Hey
What is the use of shards?

solemn latch
#

Discord only allows 2500 guilds per bot connection

sharp thicket
#

hello

solemn latch
#

Shards are the way to get more processes and connections

sharp thicket
#

I had a question

tame walrus
#

How can I setup shards?

sharp thicket
#

is it ok to shard at like 250 guilds?

solemn latch
#

Depends on your bots library

tame walrus
#

djs

sharp thicket
#

d.js

solemn latch
#

You can shard at any point. But sharding before you need it is pointless

#

And uses more ram

sharp thicket
#

oh okay

solemn latch
#

Djs has a built in sharder you can look at the guide for more info on it

tame walrus
#

Okay thanks

solemn latch
sharp thicket
#

how much ram does sharding like need?

#

or use

solemn latch
#

Each shard is an entire bot process

tame walrus
#

And so be suppose it's 2500

#

per shards

solemn latch
#

So at minimum default sharding will increase your ram usage at what your bot uses at idle.

steep socket
#

is there a way to activate google safe search from the url?

sharp thicket
#

1 shard = 2500 guild

solemn latch
#

Up to

#

Many people have shards with 1500 guilds

steep socket
sharp thicket
#

idk google

tame walrus
#

My Bot is only on 200 servers, but since I heard about it I wanted to know what it was

halcyon linden
#

somebody knows an nice api for canvas?

sharp thicket
#

canvacord?

halcyon linden
#

is for discord.js?

solemn latch
#

Canvas is pretty good on its own.

halcyon linden
#

well thanks!

sharp thicket
#

is for discord.js?
@halcyon linden you can use it with any lib thats js

halcyon linden
#

Ok

steep socket
#

any suggestions for my uinfo command?

earnest phoenix
#

@steep socket emojis

steep socket
#

wdym? like where

earnest phoenix
#

like bot for bot and Plexi_Admins for admin

steep socket
#

thats too cluttered though

#

hmm

#

i could

earnest phoenix
#

in the title of the fields

#

voltrex does that for his bot

steep socket
#

yah i will experement with it

earnest phoenix
#

alright