#development

1 messages · Page 1297 of 1

sudden geyser
#

It's not too early, but I'd say you should prepare rather than start sharding.

#

2,500 servers is your deadline, so you're 40% there.

dark kestrel
#

Im finnaly done with my Rules commands

#

yey

sudden geyser
#

good job

earnest phoenix
#

yea i know that and ive heard most people say 2k is where they started ish

dark kestrel
#

btw u can start shard when u have 10 servers

#

if u want

#

but not recommended

earnest phoenix
#

i know?

dark kestrel
#

i care ?

#

:))

earnest phoenix
#

i didnt ask if i could i asked if it was a good idea

stuck scaffold
faint prism
sudden geyser
#

confuzzled

#

@stuck scaffold the key point may be libtool is required, but wasn't found on this system

stuck scaffold
#

ty ❤️

dusk vault
#

Hey does anyone have any tips on how to get started with developing a music bot that won't get blocked from usage, via proxies? And any tips on which provider to use for this purpose?

earnest phoenix
#

what do you mean by provider

#

a host provider?

dusk vault
#

no

#

Proxy provider?

#

Do people use Lavalink

earnest phoenix
#

uh

#

you might have a misconception

#

lavalink does not offer proxies

dusk vault
#

What do they offer

earnest phoenix
#

lavalink just offers the capability to shuffle through proxies you provide

dusk vault
#

Ok, where is the best place to get proxies

#

For a reasonable price, and the kind you need for YouTube

earnest phoenix
dusk vault
#

I've googled this before

#

I'm asking for opinion, rather than google search

earnest phoenix
#

i've seen people use rsocks

dusk vault
#

Probably need to use IPv6 due to the price being lower and Google supporting them right?

earnest phoenix
#

you might have more luck browsing some reddit threads

glass wren
#

how to attack images in dc embed

#

in js

sudden geyser
#

attack?

glass wren
#

i m doing

#

attach*

sudden geyser
#

What is steamurl

glass wren
#

but the image is appearing out of embed

#

steamurl is the name of image

#

its mainly the 64id of a stam user

#

steam*

earnest phoenix
#

How can I require a javascript file into visual studio code?

#

you open the file

#

no, require into the main file other javascript files

#

into the same folder

#

into visual studio code

#

require into the main file? what does that even mean?

#

to make something like ./require... I don't remember exackly

sudden geyser
#

You want to require/import some local file.

earnest phoenix
#

no another javascript file

sudden geyser
#

Which would be a local file.

grave smelt
#

I declared the const "ping" at the beginning of the code, but in the switch when I use it it says: "Cannot access 'ping' before initialization" what can i do? (the code: https://hasteb.in/likahari.php)

opal plank
#

@grave smelt functions get hoisted, that ping function is declared first iirc

#

what exactly is that minecraft-server-util?

grave smelt
#

a module

opal plank
#

well yeah no shit

#

whats in it

solemn leaf
#

Im trying to check if my bot can send a message in the channel where the command was said

bot.on("message", async message => {
    if (!message.guild.me.hasPermission('SEND_MESSAGES')) {
        return;
    }
})

This didn't work

opal plank
#

whats exported in it?

solemn leaf
#

?

#

you want the whole thing?

grave smelt
#

whats exported in it?
@opal plank
I don't understand what you mean, inside that module the const "ping" is created

earnest phoenix
#

@grave smelt is the module REQUIRED before you use the module

sudden geyser
dire obsidian
#

Well, someone who know python, whats the best way to make GUI in Python?

sudden geyser
#

There's tkinter

grave smelt
#

@grave smelt is the module REQUIRED before you use the module
@earnest phoenix in fact the module there is

sudden geyser
#

Though I didn't like it myself.

#

It's definitely usable though.

#

There are probably dozens of other GUI frameworks available for Python.

dire obsidian
#

Well so tkinter?

#

I already used tkinter, is good but im looking for something more.

earnest phoenix
#

how do you "uninitialise" a firebase project in the current directory
do i just delete the files generated by firebase?

opal plank
#

what exactly you trying to do?

#

cuz the module exports lots of things

#

its not a function

grave smelt
#

what exactly you trying to do?
@opal plank show information about the typed server

opal plank
#

then you are doing it wrong

#

look at the example

#

util.status()

#

not util()

#

also port is an object

#

not a number

#

also it doesnt look like it takes a callback from what im seeing

#

so you need to either await its response or chain it with a then

#

like i said, functions get hoisted

#

its trying to access ping even though function() gets declared before everything else

grave smelt
#

trying with the example it says "'response' is declared but its value is never read."

earnest phoenix
#

In browser based javascript we can do importScripts("url") to import scripts from other URLs but in node.js we only have require which only accepts file paths and the file protocol (which is pointless). Can we import scripts from other URLs in node.js?

opal plank
#

@grave smelt show code

grave smelt
#

i'm doing

#

i found the error

opal plank
#

@earnest phoenix can you not ```js

fetch(url).then(r => {
const a = JSON.parse(r);
})```

#

you now have a as the whole script

earnest phoenix
#

lol forgot

solemn latch
#

I wonder why you'd need that however. whats the point 🤔

drifting wedge
#

a bit of css and its mee6 lol

opal plank
#

pulling stuff from github for example

#

with import keyword

earnest phoenix
#

I wonder why you'd need that however. whats the point 🤔
@solemn latch how the fuck can you use D3.js without it

opal plank
#

pulling code from another place can help sometimes

#

though very rarely

solemn latch
#

🤔

earnest phoenix
#

though very rarely
@opal plank why am i always in the 1% zone

grave smelt
#

@grave smelt show code
@opal plank
I changed the code to the one in the example and it always says "Cannot access 'ping' before initialization."

solemn latch
#

is ping being initialized after you use it

grave smelt
#

is ping being initialized after you use it
@solemn latch if by initialized you mean: "const ping = require ('minecraft-server-util')" yes

stark terrace
#

Hey, how are some of you guys and gals currently abstracting components of your bots such as commands and events to be able to effectively test them/make them easier to test?

solemn latch
#

then dont do that @grave smelt
initialize then use not use then initialize

opaque seal
#

Hey, how are some of you guys and gals currently abstracting components of your bots such as commands and events to be able to effectively test them/make them easier to test?
I just use another bot to test my commands. But that's becaude most of it interact with discord

#

What do you wanna test exactly?

stark terrace
#

Yeah, my buddy actually mentioned that once. For me to look into having another bot test various aspects of my bots

earnest phoenix
#

I just use another bot to test my commands. But that's because most of it interact with discord

most of it interact with discord
@opaque seal wutdafuk

stark terrace
#

Various command, configuration, stuff like that

#

Overall ability to mimic users and events

opaque seal
#

wutdafuk
?

#

Overall ability to mimic users and events
Oh ok, I don't know about that

#

Seems just too complicated compared to testing with an alt

solemn latch
#

bots can get pretty large for manual testing every time you modify something important

#

When I was reworking my bot it takes around 20 minutes to test main commands. in-depth testing can take another 30 minutes

sharp thicket
#

hi

#

anyone know how to make my bot react to a message like without it being an operating system default?

#

like with regional indicators

#

🇱

sonic lodge
#

use the unicode equivalent in your code: \🇱

green kestrel
#

Then dropped back down to 830mb

#

Gonna edit that spike outta my graph, it makes it unreadable

faint prism
#

that's a lotta data

green kestrel
#

Yeah

#

Scary thing is I dunno what caused it

#

Perhaps it joined a particularly large guild?

sudden geyser
#

but 10 gb for such a large guild?

green kestrel
#

Yeah it's gotta be a bug

#

But the interesting thing is the bot freed the ram after

#

And didn't crash

#

Normally such huge ram use results in a crash and a restart

misty sigil
#

lmao

#

wtf happened

faint prism
#

maybe gb cleared it

#

||or maybe your eval is open zoomeyes ||

honest perch
#

brain isnt stupid

misty sigil
#

it’s in the name

toxic jolt
#

I can't erase the white area below

honest perch
#

with?

#

oh

#

margin -?

toxic jolt
#

here

#

code's

honest perch
#

read the stackoverflow link

toxic jolt
#

okay thanks

#

im looking the margin

#

omg its so hard

topaz fjord
#

css is fun

earnest phoenix
#

maybe uh you shouldn't use a template

#

just a suggestion

#

makes your site look generic as fuck

topaz fjord
#

use flexbox

earnest phoenix
#

lol i just realised that the template has a vine button

toxic jolt
#

Do I work for 1 month and make a site? lol

earnest phoenix
topaz fjord
#

a what @earnest phoenix

earnest phoenix
#

a what indeed

toxic jolt
#

We work 3 people and we have a lot of workload

earnest phoenix
#

um

#

okay?

topaz fjord
#

seems like you're doing something in an inefficient way

#

it doesn't take month

toxic jolt
#

Registration and login system, api service, database setting, advertising,

earnest phoenix
#

you don't have to build elements from scratch, there are css frameworks and if you're using something like react there are complete UI frameworks fledged out with js functionality

#

cough material-ui

topaz fjord
#

if you can work fast idk like a week maybe?

#

or less

toxic jolt
#

I have a university exam, it seems ridiculous that I have to work for this site for 1 month.

earnest phoenix
#

as if we don't have exams either

#

you're not the only one who has a crammed timetable lol

#

and a month is an overestimation

#

you need a week with something like material-ui alone

toxic jolt
#

I have a tight schedule so I use templates? If there is no other problem, thank you, have a nice day.

earnest phoenix
#

yikesss

#

an inevitable failure

toxic jolt
#

An inevitable cry for u.

topaz fjord
#

bruh

#

all we said is you should consider not using a template

solemn latch
#

🤔 developer wars

topaz fjord
#

we didn't say you had to

#

@earnest phoenix material ui is overrated

earnest phoenix
#

how so

topaz fjord
#

it's literally everywhere

#

and it doesn't look that good anymore

honest perch
#

i use bulma

earnest phoenix
#

i like the MD2 design

topaz fjord
#

I prefer bootstrap

#

md2 is nice yes

honest perch
topaz fjord
#

but not md1

earnest phoenix
#

even if you don't want the MD2 design every component in material-ui is customizable with theme overrides and css-in-js

toxic jolt
#

I use a template because I don't have time. I paid for it, I had a problem, I wrote to solve it.

#

"I would never have written if I knew it would open such an empty thread." @earnest phoenix

dapper kiln
#

@toxic jolt botumu nasıl ekleyebilirim

#

@toxic jolt How can I add my bot

#

kanka

#

türk varmış ya

faint prism
#

what

earnest phoenix
#

i paid for it
that template is from themeland LMFAO

topaz fjord
#

"I don't have time"

#

yes

dapper kiln
#

@toxic jolt kanka botumu buraya nasıl eklete bilirim

topaz fjord
#

like we all have time

toxic jolt
#

that template is from themeland LMFAO
@earnest phoenix stupid this template is 17 dolar

#

i buyed.

#

okay?

#

any question?

earnest phoenix
#

sucks to be you

#

i also doubt you bought it but okay

toxic jolt
#

hah. look your life :3

dapper kiln
#

@toxic jolt kankam lütfen biri cevap verin botumu nasıl eklete bilirim

earnest phoenix
#

ps
you can't roast someone if you can't speak proper english lOL

toxic jolt
faint prism
#

Tfw ask Lead App Dev what his preference on Performance Testing Tools is, and he replies: "Don't have one. Well actually, C#"

earnest phoenix
#

the sky

#

@faint prism LMFAO

#

i love it when new devs are more qualified than the lead devs

faint prism
#

i love it when new devs are more qualified than the lead devs
@earnest phoenix No no, he is really really good.
He has a point though

earnest phoenix
#

oh

faint prism
#

@earnest phoenix Writing your own Perf Tests would allow you to run them with the Unit Tests in a pipeline

#

That and complete control

earnest phoenix
#

i never bothered though

opal plank
#

@slender thistle ^^

slender thistle
#

uhhh

earnest phoenix
#

is this a broken userbot

opal plank
#

selbot

earnest phoenix
#

yes

faint prism
#

borked

opal plank
#

def selfbot

faint prism
#

i've seen people do something close to that with benchmark.net
@earnest phoenix I'll have to look into that

earnest phoenix
celest schooner
#

does the amount of listeners a bot has increase ram usage

tight plinth
#

yes

drifting wedge
#

my pycharm isnt opening my js file

#

help

celest schooner
#

Alright

sudden geyser
#

pycharm + js?

opaque seal
#

It's a new python extention

slender thistle
#

I mean, JetBrains IDEs do have interchangeable plugins

#

I sometimes edit .js files in PyCharm when I cba to wait a whole year for WebStorm to load 😂

cyan bear
#

how do you code a discord bot?'

sudden geyser
#

Shiv I don't even bother with WS

#

I used it for a while but it just feels lame

#

Probably because of JS' largely dynamic nature

slender thistle
#

I say WebStorm but I actually use PhpStorm for web dev rofl

sudden geyser
#

at least the logo looks cool

slender thistle
#

God forbid if you get good intellisense with dynamic typing lol

sudden geyser
#

PyCharm with Python was the only IDE where I got that but I still had to give explicit types for stuff like function parameters as expected

#

Meanwhile WS wasn't very helpful a lot

violet mesa
#

@slender thistle umm sorry again the thing u gave me dont work and i tried figuring out how to fix it all day

client.antispam = {}

@client.event
async def on_message(message):
    member = message.author
    data = client.antispam.get(message.author.id)
    if data:
        if (datetime.datetime.utcnow() - data["last_sent"]).seconds <= 5 and data["message"] == message.content:
            if data["count"] < 5:
                data["count"] += 1
            else:
                role = discord.utils.get(member.server.roles, name='Muted')
                await client.add_roles(member, role)
                await mmessage.send(f"{message.author} was muted for sending to much of the same message")
slender thistle
#

Aw

violet mesa
#

no errors

#

just dont work

slender thistle
#

eh slap a print on each line and see where it stops working expectedly

violet mesa
#

ok

#

1 sec

#

it stops in if data line

slender thistle
#

oh

violet mesa
#

yee

slender thistle
#

well

#

add an else for the if data: and add data to bot.antispam for the message author's ID

violet mesa
#

okie

#

umm i dont wanna annoy u by being stoopid, how?

#

and save us time

#

@slender thistle

slender thistle
#

3 AM helping is painful

violet mesa
#

lol

#

🇸 🇱 🇪 📧 🇵

#

@slender thistle save us time and brain cells just please (by us i mean u)

#

(i cant lose brain cells if i dont have them)

slender thistle
#

bot.antispam[message.author.id] = your_data_stuff_here

violet mesa
#

your_data_stuff_here is {} right cause its a key?

#

empty key

slender thistle
#

not specifically empty value

#

you have to fill the crap in like the message, count, last_sent

shy turret
#

github student plan op

violet mesa
#

ok

opal plank
#

Hmm this is complicated

violet mesa
#

@slender thistle sorry for the brain cells

"message": "messages"
"count": 1
"last_sent": "time"
```this is what i put in the key?
slender thistle
#

message key's value is message.content

#

last_sent is datetime.datetime.utcnow()

violet mesa
#

and the count changed depends on amount of messages?

quick ridge
#

hello

#

how can i get spo presence

#

I listening spotify right now

#

but its look like custom status

violet mesa
#

?

placid iron
#

no ,

#

you have to have a comma between the fields

violet mesa
#

?

solemn latch
#

I was looking for a z lmao

violet mesa
#

oh

#

i get it

#

there we go thx

#

still stuck in the same place

#

nvm

#

ill try fix rest my self to save u brain cells

#

and then i have - of mine

#

-1 rn

#

never mind i just relized im too stoopid

#
client.antispam = {}

@client.event
async def on_message(message):
    print("start")
    member = message.author
    print("member set")
    data = client.antispam.get(message.author.id)
    print("data Set")
    if data:
        print("if data")
        if (datetime.datetime.utcnow() - data["last_sent"]).seconds <= 5 and data["message"] == message.content:
            print("if datetime")
            if data["count"] < 5:
                print("if data count more")
                data["count"] += 1
                print("data++")
            else:
                print("else")
                role = discord.utils.get(member.server.roles, name='Muted')
                print("role set")
                await client.add_roles(member, role)
                print("role adding")
                await message.send(f"{message.author} was muted for sending to much of the same message")
                print("message send")

    else:
        client.antispam[message.author.id] = {
                "message": message.content
                ,"count": 1
                ,"last_sent": datetime.datetime.utcnow()
            }
```it doesnt do the 2nd if
#

(it doesnt go to other line discord does that)

slender thistle
#

what

#

I'm...

violet mesa
#

if (datetime.datetime.utcnow() - data["last_sent"]).seconds <= 5 and data["message"] == message.content:

slender thistle
#

client.add_roles isn't a thing

violet mesa
#

dont work

#

client.add_roles isn't a thing
oh

slender thistle
#

everything server must be guild

#

it's member.add_roles without providing the member in function params

violet mesa
#

okie thx

solemn latch
#

remember to use the docs when using things you dont know

#

helps a ton

violet mesa
#

okie

#

if (datetime.datetime.utcnow() - data["last_sent"]).seconds <= 5 and data["message"] == message.content:
this line doesnt work

#

btw

#

i would apreatiate help

slender thistle
#

are you sending the same message within 5 seconds

violet mesa
#

1 sec

#

prob

#

1 sec

#

ill try spamming harder

honest perch
#

are you sending the same message within 5 seconds
@slender thistle nerd

#

Shiv don't even try

violet mesa
#

being a nerd is a good thing

change my mind

honest perch
#

Nerd

placid iron
#

how i did my anti-spam

violet mesa
#

@placid iron flex

#

@slender thistle

#

do i need to use id?

#

of the muted role

solemn latch
#

damn i wish we had error messages like that in js

violet mesa
#

lol

placid iron
#

oh are you making it add muted, you need to get the role object from the role id then what shiv says

slender thistle
#

member.add_roles(role)

violet mesa
#

k

#

sorry for realy dumb question how do i send a message in an on_message function?

#

@slender thistle

#

no mad pls

opal plank
#

has anyone here worked with child processes IPC and clustering before?

solemn latch
#

isnt it just
message.channel.send 🤔

violet mesa
#

Thx

opal plank
#

need some help figuring out how i can add event types to the processes

solemn latch
#

again, docs docs docs

slender thistle
#

isnt it just
message.channel.send 🤔
yes

violet mesa
#

it sends all the print but doesnt do message.channel.send(f"{message.author} was muted for sending to much of the same message") or member.add_roles("Muted")

opal plank
#

guess i can just add types on the object

solemn latch
#

f

solemn leaf
#

How can I check if my bot can send messages in a channel

solemn latch
#

depends on the lib

solemn leaf
#

js

solemn latch
#

thats a language

#

there are multiple js discord bot libs

solemn leaf
#

javascript?

violet mesa
#

bruh

solemn latch
#

is a language

solemn leaf
#

wdym

solemn latch
#

🤔

#

discordjs? or discordjs light or eris

#

or the other one

#

those are libs

solemn leaf
#

discordjs

#

npms

#

discordjs

violet mesa
#

send pic of start of cod

#

e

solemn leaf
#
bot.on("message", async message => {
    if (message.author.bot) return;
    if (message.channel.type === "dm") return;
    if (!message.guild.me.hasPermission('SEND_MESSAGES')) {
        return;
    }
    let prefix = await db.get(`prefix_${message.guild.id}`)
    if (!prefix) prefix = config.prefix

    if (!message.content.toLowerCase().startsWith(prefix.toLowerCase())) return;

    let messageArray = message.content.split(" ")
    let cmd = messageArray[0]
    let args = messageArray.slice(1);

    let commandfile = bot.commands.get(cmd.slice(prefix.length));
    if (commandfile) commandfile.run(bot, message, args);

})
solemn latch
#

you can just check member.permissionsIn() of the bot

solemn leaf
#

I dont know how to use that

solemn latch
#

use the docs :p

violet mesa
#

it sends all the print but doesnt do message.channel.send(f"{message.author} was muted for sending to much of the same message") or member.add_roles("Muted")
@slender thistle pls

violet mesa
#

how do u find this stuff in the docs so fast

slender thistle
#

member.add_roles(role)
@slender thistle

violet mesa
#

do u change the link

placid iron
#

oh are you making it add muted, you need to get the role object from the role id then what shiv says
member.add_roles(role)

solemn latch
#

no, i go to the docs and use them

solemn leaf
#

message.channel.permissionsIn(bot.me)

solemn latch
#

just follow the chain of things you have

violet mesa
#

thats what i did

placid iron
#

you have to add the muted role not a string called muted

opal plank
#

okay, legit, this is bullshit

violet mesa
#

ohhhhh

solemn latch
#

you use it on member not channel @solemn leaf

solemn leaf
#

docs

solemn latch
#

hopefully i tagged the right aki, theres like 40 of you

solemn leaf
#

said

#

channel.()

solemn latch
#

no it doesnt?

opal plank
#

Cannot invoke object that is possibly undefined
its process
HOW THE FUCK DOES PROCESS CAN COME UNDEFINED?

solemn leaf
#

oh

opal plank
#

how can node return process as undefined?

solemn latch
opal plank
violet mesa
#

still dont work

#

@slender thistle

slender thistle
#

Rovi, can you take over?

violet mesa
#

didnt see u were typing sorry for ping

placid iron
#

i mean i can

#

yes

#

ok

slender thistle
#

I'm about to die with my calculus fuckfest and it's 4 AM

placid iron
#

yeah you better do that

violet mesa
#

sleep

slender thistle
#

I've yet to shower also

violet mesa
#

lol

solemn latch
#

stinky mods

placid iron
#

read what i am about to say carefully

solemn leaf
#

message.guild.me.permissionsIn(message.channel)

solemn latch
#

wait, process undefined @opal plank?

#

tf

solemn leaf
#

lmao

#

poor erwin

opal plank
#

@solemn latch EXACTLY

#

WTF NODE

solemn leaf
#

didnt start their node

opal plank
#

legit losing 40% of my hair rn doing clustering

solemn leaf
#

@solemn latch what does this return message.guild.me.permissionsIn(message.channel)

placid iron
#

@violet mesa so you want to mute someone. to do that you have to add a muted role to the member. So you have to get the role called "muted" first. This can be by an ID or you can use discord.py to search for it. role = discord.utils.get(ctx.guild.roles, name="Muted") this will get a role called "Muted" and return its object. Then you have to add that to the member with member.add_roles(role) memeber.add_roles is async so you have to await it

solemn latch
#

all the perms including overwrites the bot has in the channel @solemn leaf iirc

solemn leaf
#

{ bitfield: 1341771686 }

#

this rocket sci

placid iron
#

of course if that is in a on_message then you cant use ctx.guild but rather you have to use message.guild

solemn latch
#

you can use has on the bitfield to get what you want iirc

solemn leaf
#

I just wanna check sendmessages

solemn latch
#

something like
.has(["SEND_MESSAGES"])

#

yeah

violet mesa
#
role = discord.utils.get(ctx.guild.roles, name="Muted")
await member.add_roles(role)
```if i understood correctly this should work @placid iron ?
placid iron
#

of course if that is in a on_message then you cant use ctx.guild but rather you have to use message.guild

solemn latch
#

has just gives the bool, so you can directly if it

violet mesa
#

ill read againok

#

so i need to use ctx.guild

#

oh

#

no

#

opisite

placid iron
#

yes

violet mesa
#

message.guild

#

if (datetime.datetime.utcnow() - data["last_sent"]).seconds <= 5 and data["message"] == message.content: now it stops there again ;-;

#

@placid iron u know how fix?

placid iron
#

whats the error

violet mesa
#

no error

placid iron
#

so its false?

violet mesa
#

i put a print on everyline and it stops right before it

solemn leaf
#

message.guild.me.permissionsIn(message.channel).has(["SEND_MESSAGES"])

violet mesa
#

no i was spamming and had the coldown message

placid iron
#
print("k")
if False:
  print("kk")
#

this wont error

violet mesa
#

ill do an else

placid iron
#

and wont print kk

#

also

#

its total_seconds()

violet mesa
#

1 sec

errant perch
#

cannot access "variablename" before initialization

violet mesa
#

it works!!!!!!!!!!!!

errant perch
#

hel

#

p

violet mesa
#

tysm for smart human @placid iron and spicialy @slender thistle

#

which is prob asleep

#

and i cant spell

#

im gonna "re"learn python now

placid iron
#

ok np 👌

valid frigate
#

now

placid iron
#

No

valid frigate
#

i have a general question here, what is more viable performance wise, scaling on the same machine via docker-compose or scaling out somehow over more than just 2-3 vpses

#

what i have right now is 3 instances of the bot running on 3 different servers but i've been looking into k8s which supposedly could fit what im trying to do, do i learn this or is it overkill

#

this is more of a devops question not for a specific programming language

placid iron
#

I would just use the same machine till it can't handle anymore and then get another machine and so on

valid frigate
#

any ideas are appreciated

#

interesting yeah i was going to do that originally

placid iron
#

Unless performance is paramount then you need extra overhead just in case

valid frigate
#

however i also notice that the majority of guilds that my bot is in have their location set to either korea or australia so it's across the planet

placid iron
#

I mean, what does your bot do

valid frigate
#

but most of the players come from asia

#

it's more of a concern of latency on discord's end

placid iron
#

So maybe have a compromise where you have a US East and a SEA server?

valid frigate
#

that could work

#

they are pretty much spaced apart yeah

placid iron
#

I mean that is more a question of how much money you want to pay for the response time of the bot to the most people

valid frigate
#

all right so currently

#

it's $10 a month as of right now for 2 $5 vpses from digitalocean

#

formerly had 3 but discarded the one in europe

#

i am willing to pay up to $20 a month for it out of pocket but beyond that a patreon wouldnt be a bad idea

#

logically though the majority of the playerbase is either in sea or us so i dont need to spend any more

placid iron
#

Tbh, it's up to you because if your bot isn't using much resources that it needs to be on more than 2 servers or something it's just finding where the best locations for them are for the end user experience and if you feel like spending more for lower ping else where then you can but if most people are SEA and US then it does make sense to have the 1 in each

valid frigate
#

yeah you are right

#

and to be fair it's definitely an eye opening experience when running on a budget since i suppose it sort of forces you to optimize code in a way

#

very f u n

earnest phoenix
#

why cant databases just be like 1 line of code, and REALLY simple to integrate into a command, my small brain can't handle it😭

solemn latch
#

they are 1 line mostly 🤔

rough swift
#

which language are you using?

earnest phoenix
#

python

rough swift
#

pickledb

#

is a great one

#

if you don't need large scale

#

not as fast as sql but super easy to integrate

earnest phoenix
#

i honestly can't even wrap my head around it, purely because idk where to start with it 😂 i have to break my whole Blacklist command down and put it back together differently

rough swift
#

oh dear

#

is it storing blacklists in memory

earnest phoenix
#

it was in a Json, but now i have to move it to a db

rough swift
#

ahh I see

earnest phoenix
#

yh

rough swift
#

I've never really done anything of decent scale in python that needed anything more than json

#

I've been looking at tinydb for whenever I need to; haven't used it yet though

#

looks simple enough

earnest phoenix
#

i'm trying to use sqlite, it's Simple ish, but my brain just cant make sense of it,

faint prism
#

I have a book on databases

#

They are indeed complex topics

#

However, small projects can simply them down to the complexity of what is essentially is an Excel file

drifting wedge
#

Error: (XID wumfys) Could not determine the nameserver IP addresses for “archbot.tech”. Please make sure that the domain is registered with a valid domain registrar.

#

i get this error when adding a domain in cpanel

#

like i pointed it to the name servers from get.tech

solemn latch
#
SELECT * 
FROM balance_table
WHERE Balance = 10000;

@earnest phoenix
This will select all collumns(* means any matching, or all)
from the table named balance_table
where the users balance is 10,000.
if theres 5 users with 10,000, it gets all 5.
if its none, it gets none.

#
INSERT INTO balance_table (ID,NAME,AVATAR,Balance,IsCute)
VALUES (136583532972605440, 'Woo', 'AvatarURL', '10000', false );

Would insert me into balance table

opal plank
#

i did it

solemn leaf
#

Is this right then

#

message.guild.me.permissionsIn(message.channel).has(["SEND_MESSAGES"])

opal plank
solemn latch
#

should be

solemn leaf
#

So

#

Is it like a if

#

Or

#

message.guild.me.permissionsIn(message.channel).has(["SEND_MESSAGES"]) { return };

solemn latch
#

it gives a bool
if it has send messages it gives true

solemn leaf
#

Ah

#

Ok

#

If!message.guild.me.permissionsIn(message.channel).has(["SEND_MESSAGES"]) {
Return }

#

That should work then

opal plank
solemn latch
#
if (!message.guild.me.permissionsIn(message.channel).has(["SEND_MESSAGES"])) { return }
#

missing the () for the if

solemn leaf
#

I never do that lol

solemn latch
#

ease of reading

#

🤷‍♂️

solemn leaf
#

My nitro isnt gone yet

somber bay
#

I have the lock and unlock command for dbd.

opal plank
solemn leaf
#

K thanks I'll have to try it layer

opal plank
#

spawning them as needed

silver lintel
#
if (!db.has(`${user.id}.modlog.totalInfracCount`)) {
        db.set(`${user.id}.modlog.totalInfracCount`, 0)
        console.log(db.get(`${user.id}.modlog.totalInfracCount`));
      }
``` tihs is logging undefined
solemn leaf
#

Hmm

opal plank
#

@silver lintel fairly certain thats a rpomise

#

promise*

#

wait it

earnest phoenix
#

@solemn latch how would one put someones ID into it?

solemn latch
#

like searching someones id?

opal plank
#

also why you getting something that you LITERALLY put above?

#

why 2 calls?

solemn latch
#
SELECT * 
FROM balance_table
WHERE ID = 136583532972605440;

^ would get my id from the collumn ID in the balance table

earnest phoenix
#

@solemn latch no, so the blacklist command Puts their ID into the DB so they can't use the bot,

solemn latch
#

yeah, i am just using example values.

#

adding new users to the db is called inserting
https://www.sqlitetutorial.net/sqlite-insert/
so if you wanted to add me to the db(again example of a balance bot)

INSERT INTO balance_table (ID,NAME,AVATAR,Balance,IsCute)
VALUES (136583532972605440, 'Woo', 'AvatarURL', '10000', false );

getting those values would be the one above.

opal plank
#

***JAVASCRIPT ***
question, is there a way to check when a variable change? Without something like setInterval checking it every so often or something of the likes, kind of a listener. variable.on('update', () => {}) ?

solemn latch
#

i feel like making an event for something like that would be easy.

opal plank
#

howcome?

earnest phoenix
#

so..... it'd be sql INSERT INTO Blacklisted_IDs( user_id ) ?

solemn latch
silver lintel
#
let counter = 0;
    let interval;
    
    message.channel.send(text[counter]).then(sent => interval = setInterval(() => {
      if (!text[counter + 1]) return clearInterval(interval);
      counter += 1;
      sent.edit(sent.content + text[counter]);
    }, (speed * 1000)));
``` wgere do i put async?
blissful coral
#

The question is, can I ask for help with html/ejs here?
If it is for my bot

opal plank
#

@solemn latch ty

earnest phoenix
#

@blissful coral yh

solemn latch
#

@earnest phoenix that wouldnt actually insert anything

INSERT INTO Blacklisted_IDs( user_id )
VALUES( 136583532972605440 )
blissful coral
#

So moving a old taskbar over, filled in some blank data (gonna be a dashboard)

#

What it looks like^

#

Supposed to look like^

solemn latch
#

just the first () is the order of the variables your setting

blissful coral
#
<head>
  <meta charset="UTF-8">
  <title>Dashboard</title>
  <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/css/bootstrap.css'>
<link rel='stylesheet' href='https://use.fontawesome.com/releases/v5.0.13/css/all.css'><link rel="stylesheet" href="./style.css">

</head>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/esm/popper.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.1/js/bootstrap.js'></script><script  src="./script.js"></script>
#

All files are required already

earnest phoenix
#

@solemn latch what would the Values be for trying to implement someone into it? I.E the bot getting someones ID and then putting it into the data base, ?

solemn latch
#

VALUES ( THEUSERSID )

#
UserToBlacklist = 136583532972605440
sqlQuery = f"INSERT INTO Blacklisted_IDs( user_id )
VALUES( {UserToBlacklist} )"

^^ the getting the query

import sqlite3

conn = sqlite3.connect('test.db')
conn.execute(sqlQuery)
conn.close()
#

Something like that?

#

im not a py user, doing my best :p

earnest phoenix
#

all good, i appreciate it😂 it's pissing me off not understanding it, but i'm trying to, So with this going into a command, would it be something like py "INSERT INTO Blacklisted_IDs( user_id ) VALUES( {member.id} )" because i'd be @'ing the person to blacklist them

solemn latch
#

yep, that would add that user to the list of ID's

#

or list is a bad word to use here because python calls arrays lists

#

but to the db

#

and then if you wanted to just check if a user is in that db youd use select

earnest phoenix
#

and if i wanted to remove them i'd just change insert into?

solemn latch
#

youd just use delete

DELETE FROM Blacklisted_IDs
WHERE user_id = {member.id};
earnest phoenix
#

well... this has been Simpler than everyone else has made it out to be...

solemn latch
#

hello 😛

earnest phoenix
#

hi hi hi hi :D

scenic kelp
#

@earnest phoenix can you cut it out

solemn latch
#

yeah, no one makes it easy

earnest phoenix
#

ok hi hi hi hi hi

scenic kelp
#

wrong channel as well

solemn latch
#

many tutorials expect you to want complex queries

earnest phoenix
#

i knpw

#

hi hi hi hi

#

o bye bye bye bye

#

everyone who i've spoken too says its so easy and todo it myself, and every video i've tried watching take me through a Rollercoaster of random things,

#

hi again

solemn latch
whole magnet
#

How do I find my bot code

#

client id?

solemn latch
#

discord dev site

whole magnet
#

Do I create an application, this is my first time

opaque hawk
#

Yes

solemn latch
#

yeah

opaque hawk
#

I came to ask

earnest phoenix
#

-id @whole magnet

gilded plankBOT
#

@whole magnet

An ID is a unique number which is used to identify a user, bot, channel, or message. To obtain an ID, right click on it and click "Copy ID"; this can be done from mobile by holding down.

Should you not see the option to acquire an ID, you need to enable "Developer Mode" which can be done from your user settings, under "appearance".

whole magnet
#

so I use my id?

earnest phoenix
#

-bots

gilded plankBOT
earnest phoenix
#

+help

whole magnet
#

_bots

#

-bots

gilded plankBOT
#

tickNo This user has no bots

solemn latch
#

please dont do commands here

whole magnet
#

Lol

#

ok

solemn latch
#

the dev portal will tell you your bots id after you make it

opaque hawk
#

When I do an eval command (evaluates a JavaScript expression/code), how do I make the bot send an embed? Because When I do r!eval const embed = new MessageEmbed()
// Embed code here
It doesnt work, returning that MessageEmbed is not defined. How would I define MessageEmbed without doing const MessageEmbed = require('discord.js')

earnest phoenix
#

oh oke

opaque hawk
#

I'm asking because I coded my bot in typescript

solemn latch
#

ERWIN

#

@opal plank

opal plank
#

pong

opaque hawk
#

ponged

opal plank
#

wot?

solemn latch
#

typescript question KEKW

opal plank
#

typescript isnt related to that error

solemn latch
#

ah

opal plank
#

its just not defining it

solemn latch
#

i only read typescript ;p

opaque hawk
#

Eval evaluates it in JavaScript

opal plank
#

@opaque hawk why you defining it that way?

#

yeah, eval is js

#

always

#

so writing eval in typscript is a waste of time

opaque hawk
#

I don't know how to make an embed in JavaScript, only TypeScript with my tsconfig

opal plank
#

you'd need to recompile it

#

but like i said, its the same in both ways

#

theres no difference whatsoever

#
const { MessageEmbed } = require('discord-js');

new MessageEmbed().set().title()... blah blah blah

#

also

#

stop using embed builder

opaque hawk
#

TypeScript embed:

require { Message, MessageEmbed } from "discord.js";
const embed = new MessageEmbed()
.setColor("#000000")
// ...```
opaque hawk
#

That looks ugly

opal plank
#

why you requiring like that?

#

you using import syntax on require

opaque hawk
#

Because that is how you do it with my tsconfig

#

wait

#

yeah i forgot

opal plank
#

you either import or require

#

that syntax is for imports

#

not requires

opaque hawk
#
import { Message, MessageEmbed } from "discord.js";
const embed = new MessageEmbed()
.setColor("#000000")
// ...```
#

There

#

I forgot, I actually haven

#

havent coded in a week

opaque hawk
#

Ok thanks

opal plank
#

now back to screeching at Ts

opaque hawk
#

lol

opal plank
#

doing some rather complicated shit ngl

#

pulling my hairs nonstop

solemn latch
#

good

opal plank
solemn latch
#

ive done almost zero code work in a month

#

kek

opal plank
#

productivity stonks

solemn latch
#

doing the work for us both ;p

opal plank
#

bruh this shit harder than i thought it would

solemn latch
#

did the thingy i link to work?

opal plank
#

yeah, though i havent used it

#

i was going to use it to dynamically spawn more node processes

#

but i can do it another way which will probably work even better

solemn latch
#

ay

opal plank
#

legit, the bot cannot handle that many streams

#

so im clustering it into different connections

earnest phoenix
#

scale that bitch up

opal plank
#

precisely what im doing

earnest phoenix
#

might wanna look into something like kubernetes

opal plank
#

creating slaves to connect and re-emit all events to the main

#

i have, but i decided to made my own

earnest phoenix
#

sounds good

solemn latch
#

im glad my bot never got any attention, dont have to bother with any of this

opal plank
#

just for learning

#

this branch test wont go live for general use i dont think

#

also theres nothing to gain from it rather than just pure experience

#

that main bot IS already stable and good

#

added my own cache and a ton more of other fancy shit

earnest phoenix
#

Very nice

opal plank
#

though the library clearly doesnt handle that big of a influx of messages

#

those gaps is the process itself(not even the lib) dying

earnest phoenix
#

did you make your own lib or are you using something else?

opal plank
#

and becoming unresponsibe

#

both

#

using Twitch-js, but they only offer the connection to twitch's IRC

earnest phoenix
#

dang thats crazy, clustering should be a good fix

#

ah

opal plank
#

everything else is done on my side

#

so that handles the webscokets and connections for me

#

though ive already reported to them some quite bit flaws in their ratelimiting internally

#

which they havent even replied to yet

#

10 days ago, and neither of them joined the repo i invited them to test

#

gotta love when that happens

#

10 days ago and no response

solemn leaf
#

Erwin got nitro back

opal plank
#

yup, thanks to @drowsy sentinel AShug

#

but yeah, if they wont fix their library, i'll just fix it myself

#

by clustering

solemn leaf
#

Haha mine should be ending any time soon

earnest phoenix
#

@solemn latch i Think i Might have gotten it..

carmine summit
#

Discord should make an option where you can hide bots in audit log

solemn latch
#

ay @earnest phoenix

earnest phoenix
#

i think i have it atleast,

#

😂 i hope so,

sudden geyser
#

Discord should make an option where you can hide bots in audit log
@carmine summit they should also make an option where you won't emit typing events when you start typing anything

earnest phoenix
#
   if ctx.author.id not in BlacklistedUser_IDs:
NameError: name 'BlacklistedUser_IDs' is not defined```
#

pandasad how tf can i define something in a database....

solemn latch
#

like creating a db?

earnest phoenix
#

no, thats the check function, i'm trying to run a command, and it says that isn't defined that, is the Table of the database.

solemn latch
#

so the column doesn't exist?

earnest phoenix
#

BlacklistedUser_IDs is the Table, and User_IDs is the PK

solemn latch
#

few answers around on stackoverflow

earnest phoenix
#
Ignoring exception in on_message
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/client.py", line 312, in _run_event
    await coro(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 930, in on_message
    await self.process_commands(message)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 927, in process_commands
    await self.invoke(ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 892, in invoke
    await ctx.command.invoke(ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/core.py", line 790, in invoke
    await self.prepare(ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/core.py", line 743, in prepare
    if not await self.can_run(ctx):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1011, in can_run
    return await discord.utils.async_all(predicate(ctx) for predicate in predicates)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/utils.py", line 324, in async_all
    for elem in gen:
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/discord/ext/commands/core.py", line 1011, in <genexpr>
    return await discord.utils.async_all(predicate(ctx) for predicate in predicates)
  File "OwO.py", line 185, in not_allowed
    if ctx.author.id not in BlacklistedUser_IDs:
NameError: name 'BlacklistedUser_IDs' is not defined```
#

@solemn latch i'm trying to get the bot to check the db for the User's ID but idk how i'd do it because it's bringing that up

solemn latch
earnest phoenix
#

yes

#

thank you lol

#

ok.... i've fixed that error by doing ```py
BlacklistedUser_IDs = ["blacklisted.sqlite"]

def not_allowed(ctx):
if ctx.author.id not in BlacklistedUser_IDs:
return True
else:
return False```

#

but now, it wont work 😂

#

i hate this soo much

solemn latch
#

did the two links i posted help at all?

earnest phoenix
#

no 😦

solemn latch
#

not sure, seems to be the way python handles it rather than SQLite itself.

#

someone who knows python better would know.

earnest phoenix
#

i think its something in my blacklist code - because all my other commands are working apart from them 2

solemn latch
#

I think you need to import the table.

earnest phoenix
#

hmm

solemn leaf
#

@solemn latch You still on?

#
bot.on("message", async message => {
    console.log("ne")
    if (message.author.bot) return;
    if (message.channel.type === "dm") return;
    if (!message.guild.me.permissionsIn(message.channel).has(["SEND_MESSAGES"])) {
        return;
    }
    let prefix = await db.get(`prefix_${message.guild.id}`)
    if (!prefix) prefix = config.prefix

    if (!message.content.toLowerCase().startsWith(prefix.toLowerCase())) return;

    let messageArray = message.content.split(" ")
    let cmd = messageArray[0]
    let args = messageArray.slice(1);

    let commandfile = bot.commands.get(cmd.slice(prefix.length));
    if (commandfile) commandfile.run(bot, message, args);

})

This returns 'DiscordAPIError: Missing Permissions' And the ne logs twice

earnest phoenix
#

Does it happen when trying to run a command?

solemn leaf
#

yes

earnest phoenix
#

Which command

thick gull
#

its probably the command

solemn leaf
#

Im testing if I can just check the bots permissions in the index not the command

#

Im trying it with the ping and eval

pseudo cobalt
#

how do i make it so when someone pings someone it deletes the message

solemn leaf
#

Im evalling hi

earnest phoenix
#

But some commands require other permissions than just send messages

solemn leaf
#

the ping

#

only requires send messages

pseudo cobalt
#

how do i make it so when someone pings someone it deletes the message

#

what are the commands

earnest phoenix
#

It might be because the bot doesn't have permission to view the channel

solemn leaf
#

It does

solemn latch
#

your not giving enough info @pseudo cobalt

solemn leaf
#

how would it be able to see that I sent the message @earnest phoenix

earnest phoenix
#

Also include the VIEW_CHANNEL permission check

opal plank
#

That makes no sense

solemn latch
#

is it trying to use images or reactions?

opal plank
#

Ir shouldnt get the message event from that channel on the first place

solemn leaf
#

can I just and the if?

#

||

earnest phoenix
#

It does if you didn't know

solemn leaf
#

or is it &&

solemn latch
#

you can put them all in the []

opal plank
#

Bots dont recieve events from channels they dont have access to

solemn leaf
#

wait

earnest phoenix
#

Lemme test

solemn leaf
#

["SEND_MESSAGES", "VIEW_CHANNEL"]

#

?

opal plank
#

It just cant reply here

#

But it can see msgs here

solemn leaf
#

voltrex

#

eval something

opal plank
#

Do it on a channel ir ACTUALLY isnt on

solemn leaf
#

that sends a mesage to testing 1

earnest phoenix
#

Erwin

opal plank
#

Sup

earnest phoenix
#

Are you talking about private channels?

solemn leaf
#

I did this

#

if (!message.guild.me.permissionsIn(message.channel).has([["SEND_MESSAGES", "VIEW_CHANNEL"]])) {
return;
}

opal plank
#

Any channel the bot cant access

earnest phoenix
#

So, his bot surely wouldn't give an error if it didn't have access to the channel

#

x!backup create

#

Something is off here

fluid basin
#

no don't run commands here

solemn leaf
#

it can see the channel

fluid basin
#

wot

solemn leaf
#

DiscordAPIError: Missing Permissions

oak cliff
#

-botcommands @earnest phoenix

gilded plankBOT
#

@earnest phoenix

Hey! Bots aren't given permissions to send responses in this channel. Please use #commands or #265156322012561408 to run commands. In addition, bots with commonly used prefixes cannot read or send messages in any channel. This is done to prevent spam and bot abuse.

opal plank
#

It wouldnt get a message from that channel to beging with

#

If it could see msgs there

fluid basin
#

view_channel does not mean you can send

opal plank
#

Otherwise bots would be able to access all channels here too

fluid basin
#

you just need to check for send

opal plank
#

Indeed, 2 different things

solemn leaf
opal plank
#

If its RECIEVING a message, it can SEE the channel and message it belongs too, but that doesnt mean SEND_MESSAGES

earnest phoenix
opal plank
#

Or other perms

solemn leaf
#

yeah it isnt workin

fluid basin
#

yes you're trying to create a message voltrex

opal plank
#

Unless you specifically targeting a channel id you dont have

fluid basin
#

its a post request

solemn latch
#

can you do the command in a channel with every perm

earnest phoenix
#

yes you're trying to create a message voltrex
@fluid basin bruh That's what this guy is also trying to do

fluid basin
#

wtf

solemn leaf
#

@earnest phoenix

opal plank
#

Im fairly certain you can request EVERY channel on the guild, regardless of permissions. However if you are getting channel id from MESSAGE, its not possible, because a message event wouldnt be fired from a channel you dont have acess to begin with

solemn leaf
#

this is the terminal

#
ne
(node:4968) UnhandledPromiseRejectionWarning: DiscordAPIError: Missing Permissions
    at RequestHandler.execute (C:\Users\Owner\Desktop\discordjs2\node_modules\discord.js\src\rest\RequestHandler.js:170:25)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:4968) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:4968) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
ne
#

ne is what Im logging at the top of the message event

fluid basin
#

your bot is trying to send a response to the message

opal plank
#

You either got a static id(not coming from message) or the error is from somewhere else

earnest phoenix
#

He says it's from the ping command that this error happens

opal plank
#

Whats rhe actual command?

solemn leaf
#
const Discord = require("discord.js");

module.exports.run = async (bot, message, args) => {
    let color = '#' + ("000000" + Math.random().toString(16).slice(2, 8).toUpperCase()).slice(-6)
    const Embed1 = new Discord.MessageEmbed()
        .setColor(color)
        .setTitle('Ping?')
        .setAuthor('Help Command')
        .setDescription('Pinging...')
        .setImage('')

    message.channel.send(Embed1).then(m => {
        var ping = m.createdTimestamp - message.createdTimestamp;

        const Embed = new Discord.MessageEmbed()
            .setColor(color)
            .setTitle('Ping?')
            .setAuthor('Help Command')
            .setDescription('Pong!')
            .setImage('')
            .setFooter("Ping " + `${ping}` + " ms");
        m.edit(Embed)
    });
}

module.exports.help = {
    name: "ping"
}
earnest phoenix
#

Seems correct to me

solemn latch
#

does the bot have perm to use images?

setImage('')

fluid basin
#

you can't send the first embed

opal plank
#

Again

#

Check for SEND_EMBEDS perm

#

AND

solemn leaf
#

OH

#

LOL

fluid basin
#

ah yes

opal plank
#

SEND_MESSAGES

#

There are 2 perms u need

#

Both of which i just listed

solemn latch
#

you need attach images too for that too correct?

earnest phoenix
#

bruh SEND_EMBEDS is not a valid permission flag

fluid basin
#

SEND_MESSAGES, EMBED_LINKS

solemn leaf
#

new error guys

#

RangeError [BITFIELD_INVALID]: Invalid bitfield flag or number.

solemn latch
#

presuming there are images linked there

solemn leaf
#

lol

opal plank
#

U got the point

solemn leaf
#

dont make me look

opal plank
#

There's attachments and embeds perms too

solemn leaf
#

EMBED_LINKS

fluid basin
#

ATTACH_FILES

#

if you need it

opal plank
#

Im on mobile and in the middle of a party, i can only five directions

fluid basin
#

mobile party?

opal plank
#

Opening docs oj mobile not happening

solemn leaf
#

my bot didnt message me the error

solemn latch
#

the other thing, you can figure out what perms each command needs and check that in your command handler dynamically

solemn leaf
fluid basin
#

bruh

solemn leaf
#

still logging ne twice

#

ne
ne

fluid basin
#

make a channel for logging

#

and not DM you

solemn leaf
#

why

fluid basin
#

its better that way

solemn leaf
#

why

opal plank
#

No reason tbh

fluid basin
#

especially if you're not the only one working on the bot

solemn leaf
#

^^

opal plank
#

Unless you wanna give someone access

solemn leaf
#

What if Im the only one working on the bot

opal plank
#

Then it shouldnt matter

fluid basin
#

and you can't delete DM messages from the bot

#

unless you do it through the bot

solemn leaf
#

why would I need to?

#

Im the only one that can see it

fluid basin
#

idk

opal plank
#

I'd recommend proper logging, but its not necessary

earnest phoenix
#

If it logs ne twice then it means you're running 2 instances of the bot?

solemn leaf
#

its not gonna send my token

#

I dont think I am

#

hold up

#

bot.on("ready", async () => {
});

bot.on("message", async message => {
})

bot.login(config.token)

fluid basin
#

No reason tbh
legit reason: no reason
but it seems more practical and organised that way

solemn leaf
#

this is the only stuff involving the bot

opal plank
#

@fluid basin agreed

fluid basin
#

do you have 2 message listeners

solemn leaf
#

no

earnest phoenix
#

Again, check if you're running 2 instances of the bot

fluid basin
#

voltrex, even if aki has 2 instances it won't print in the same terminal bruh

earnest phoenix
#

What?

solemn leaf
#

want my whole index

opal plank
#

Remive toke

#

U got it

solemn leaf
#

I use files for it

opal plank
#

Hastebin

solemn leaf
#

idk how hastebin work

earnest phoenix
#

Try to regenerate your token and use the new one

solemn leaf
#

ok

#

yeah that did it

#

why thou

fluid basin
#

next time upload to a code sharing service (except pastebin)

#

its hard to see on mobile

earnest phoenix
#

You must have been running the bot 2 times but we don't know how

opal plank
#

Actually, when does the bot disconnect on token refresh? On next ACK?

solemn leaf
#

WOAH

#

LETS TEST

#

nah to lazy

fluid basin
#

iirc the gateway will send a OP RECONNECT

#

when you reset it

opal plank
#

Hmmm interesting

#

Today we learned

solemn leaf
#

it randomly ne

#

me

#

I didnt run a command

#

;()

earnest phoenix
#

bruh Wot

solemn leaf
#

BRO NO ONE DID A COMMAND AND IT RAN WHAT

opal plank
#

Did u put the new token!

solemn leaf
#

yes

solemn latch
#

is your bot public? 🤔

solemn leaf
#

its in server Im in only

solemn latch
#

is it public tho

solemn leaf
#

yeah

#

but Im in the servers that its in

solemn latch
#

then someone coulda added it?

solemn leaf
#

lol

solemn latch
#

or ran the command

solemn leaf
#

ch-servers

fluid basin
#

lol erwin this is getting dumb

#

did you see the code yet

#

the logging is placed before any conditionals

#

so yeah ofc it will run

#

like duh

#

unless d.js or node is broken

solemn leaf
#

this funny

#

tho

#

okay welp thanks

opal plank
#

Bad

fluid basin
#

also be careful when using process onunhandled/onexception

solemn leaf
#

ne
ne
ne
ne
ne
ne
ne
ne
ne
ne

opal plank
#

Thats against tos

solemn latch
#

self bot, reported KEKW

opal plank
#

Do not share server names

#

And selfbot

#

Lmao

solemn latch
#

it wasnt

#

joking

solemn leaf
#

I own 98% of them

#

lol

opal plank
#

Still