#development

1 messages · Page 708 of 1

outer niche
#

Would this work

unique nimbus
#

Have you tried

outer niche
#

Yee

slim heart
#

Does it work

outer niche
#

I just give me a massive long error

slim heart
#

Say error and wait for help

outer niche
unique nimbus
#

thats not an error

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

unique nimbus
#

yes

outer niche
sage bobcat
#

One message removed from a suspended account.

unique nimbus
#

Pynacl library

#

look at the error

#

Runtime Error:

outer niche
#

I did look

unique nimbus
#

It says right there

#

pip install PyNaCl

outer niche
#

And I still can't solve the issue

#

Ok

#

Thank you

slender thistle
#

Not so sure about ctx.bot there bud

#

voice_client is property of a Guild instance

slim heart
#

is there a good like .htpasswd control panel, like, the ability to edit users typa thing etc, with grouped files to allow for rankings in nginx?

earnest phoenix
#

collection.findOneAndUpdateOne is not a function

mossy vine
#

it indeed is not

earnest phoenix
#

Anyone know why it returns Cannot read property 'guild' of undefined

#

@earnest phoenix what line?

late hill
#

You're not passing message to your play function

elder vine
late hill
#

Why are you using Messages.findOne() a second time

#

You already have it in MessagesUser

near ether
#

Kinda going back to my previous question, would the best way to implement a cooldown be storing ID’s in a list and then using setTimeout to remove them?

marsh frost
#

That could potentially be a big list.

#

I store timestamps for each command used in a SQL db, then check the time dif before each command.

#

Plus if it's a list, it won't persist through bot restarts (not sure how long of a cooldown you are needing)

near ether
#

That’s a really good idea

#

I’ll give it a shot, thanks @marsh frost 🙏

outer niche
#

I am making a music bot I have the join and leave commands I do not know how to go about playing audio commands can someone help me

marsh frost
#

@near ether Which language are you using?

quartz kindle
#

make your bot be the only music bot with no audio

#

you'll get certified for being unique

unique nimbus
#

yes

near ether
#

I’m using JavaScript

marsh frost
#

Ah rip, was going to provide some snippits

outer niche
#

It is in python and I kind of wanted to do music not silence

marsh frost
#

I'm sure you can figure it out though

outer niche
#

I'm really just looking for someone to point me in the right direction

earnest phoenix
#

https://google.com/ has been a big help tbh

outer niche
#

it is not to me

shy turret
#

@earnest phoenix ew use docs uwu

earnest phoenix
#

lol you find those on google too

shy turret
#

Lol

#

Actually google can be good if ur lazy to code

earnest phoenix
#

@outer niche I searched on google and the first thing I found answers your question

#

just use google™

#

there is even video tutorials

glacial anchor
#

just finished making my first ever bot on discord.js

#

that was a lot of stress

#

adding it on botlist now

shy turret
#

How do u make a lib?

#

Guessing GET and POST etc

#

But like how?

mossy vine
#

lib for what

outer niche
#

Like I said before it did not help

earnest phoenix
#

how tho

#

literally the very first result is a video

slender thistle
#

YT videos aren't exactly the best when it comes to discord.py

outer niche
#

And for some reason when he does it I did the same exact way and it's not working on my computer

slender thistle
outer niche
#

Like I have not already figured that out

slender thistle
#

:p

outer niche
#

Which is why I have asked for help

#

But everybody keeps on pointing me towards Google which again is not helping me

slender thistle
#

Let me do something else

earnest phoenix
#

lol

#

docs seem pretty well put together

slender thistle
#

Honestly though, migration docs are the best way apart from someone literally holding your hands and telling you what's there to fix

outer niche
#

Lol I'm going to go find other people that can help me

slender thistle
#

k3llyShrug That's just your laziness at this point

earnest phoenix
#

watch them say the same thing

#

^

slender thistle
#

You are expected to be willing to put at least small effort into learning

earnest phoenix
#

seems he/or she is expecting the spoon

#

full of ||free code||

outer niche
#

If you have watch the video I sent it's not all about coding

earnest phoenix
#

then try what shiv sent

#

the docs

slender thistle
#

Installing ffmpeg is quite simple

outer niche
#

I have installed it

slender thistle
#

Just like most of audio stuff out there thonkku

earnest phoenix
#

literally the docs have a search function too

slender thistle
#

Oh right, the d.py GitHub repo should have music examples too

outer niche
#

It's not showing up

slender thistle
earnest phoenix
#

^

slender thistle
#

What'd ya need for that, culan?

#

If you got pip why bother with env var?

outer niche
#

I don't know that's just how he did in the video which is what I was trying to follow

slender thistle
#

Oh, for ffmpeg

outer niche
#

Yes

valid frigate
#

yall

outer niche
#

So I just need to do that

earnest phoenix
#

😳

valid frigate
#

what is the best way to store cooldowns across node processes

slender thistle
#

Wrong thing btw

valid frigate
#

i'm using ipc to communicate cooldown maps to other processes

slender thistle
#

You need cmd

valid frigate
#

but i'm worried it will eat memory

slender thistle
#

or huh

outer niche
#

I'm confused on what I actually need to do here

earnest phoenix
#

im just gonna put this here

#

🤦

slender thistle
#

You need to install ffmpeg manually

outer niche
#

And that's what I'm having trouble with

slender thistle
outer niche
#

I get it that's what you download it through but from there what do I need to do

slender thistle
#

Later you go to environment variables and slap in the directory you installed ffmpeg in

outer niche
#

And that's what I've been trying to do but I can't get it to work

slender thistle
#

What's up

outer niche
slender thistle
#

Do you remember the path where you installed FFMPEG?

outer niche
#

???

amber fractal
#

did you install ffmpeg?

earnest phoenix
outer niche
#

Oml yes

amber fractal
#

Then what's with the question marks

#

He just asked you if you remembered where you installed it

unique nimbus
#

Why are you spoonfeeding

outer niche
#

Are you talking about what drive I installed it to

slender thistle
#

The folder you saved ffmpeg stuff in

earnest phoenix
#

I just blinked

outer niche
#

Yeah the folders called ffmpeg

quartz kindle
#

@valid frigate if you need to store something across multiple processes, a better way would be to use a database, or an in-memory database if the data is volatile

slender thistle
#

You should see a folder "bin" in the folder "ffmpeg"

quartz kindle
#

something like redis would be a good option

slender thistle
#

Enter that directory and copy the full path to it

outer niche
slender thistle
#

Okay the full path seems to be C:\ffmpeg\bin for you

#

just add that in environment variables

outer niche
#

Is that all I need to do with FFM peg

#

Before I start the code

slender thistle
#

Looks like it

outer niche
#

Ok thx

willow magnet
#

Can anyone teach me how can i change it?

earnest phoenix
#

bc you didnt send data to dbl regarding to your server count

#

download the dbl api and log into your token in a interval

willow magnet
#

How can i send them?

earnest phoenix
#

look the docs

willow magnet
#

Where is it?

#

Link

earnest phoenix
#

looking a little but would have worked

willow magnet
#

{"error":"Oops, I think a bad happened, I'm trying again just hang in there"}

earnest phoenix
#

what the f

#

all of my errors will just say "oopsy woopsy uwu problem pwez fix" but thats just me

#

aight

willow magnet
#

Well

#

I generated it

earnest phoenix
#

I have a question too, anyone knows anything about pug.js and How can i pass a collected variable from the website to the script

#

bc im stupid

willow magnet
#

(token)

#

Now what?

earnest phoenix
#

@willow magnet look the docs how to login and send stats before you ask please

#

^ we aren't gonna spoon feed

#

^

willow magnet
#

@earnest phoenix

#
Bots is ready and working in 40 servers with 23259 users!```
#

I didn't get a message

#

That count is posted

#
const dbl = new DBL('Your top.gg token', client);

// Optional events
dbl.on('posted', () => {
  console.log('Server count posted!');
})

dbl.on('error', e => {
 console.log(`Oops! ${e}`);
})```
#

I already installed dblapi.js

earnest phoenix
#

did you log in with ur token

#

const dbl = new DBL('TOKEN', client)

willow magnet
#

Yes

#

My DBL token

earnest phoenix
#

enter it there

#

and then

willow magnet
#

Does it takes any time to send the message?

earnest phoenix
#

no

willow magnet
#

I already added it there

earnest phoenix
#
client.on('ready', () => {
    setInterval(() => {
        dbl.postStats(client.guilds.size, client.shards.Id, client.shards.total);
    }, 1800000);
});
#

could you scoll down

willow magnet
#

Oh lol

earnest phoenix
#

WHY ARE YOU SHARING THE TOKEN

#

BRo

#

oh no

willow magnet
#

Wrong

earnest phoenix
#

F

#

reset token

willow magnet
#

Sry

#

Done

quartz kindle
#

you shouldnt need to postStats

#

dbl should automatically do that

#

every 30 min or so

slender thistle
#

if you provide your client to it

valid frigate
#

are there types for the dblapiLUL

#

actually curious

slender thistle
#

Types?

mossy vine
#

yes

outer niche
#

it wont let me do pip install youtube_dl

unique nimbus
#

pip install youtube-dl

lunar crystal
#

How much does it takes to learn the basics of js ?

mossy vine
#

just learn instead of worrying about time

outer niche
#

Will this still work with a exception of a couple of things

lunar crystal
#

No haha I'm not worrying at all

outer niche
earnest phoenix
#

test it and find out

outer niche
grizzled jackal
#

Idk if it's a rule or not but if it's not - people should test their code first and try troubleshoot themselves first before asking here

outer niche
tulip tundra
#

readable

outer niche
#

thos are the errars

slender thistle
#

How about reading the errors

outer niche
#

i did

earnest phoenix
#

did you tho

slender thistle
unique nimbus
#

ffs

outer niche
earnest phoenix
#

Idk if it's a rule or not but if it's not - people should test their code first and try troubleshoot themselves first before asking here
welcome to dbl, low iq people here tend to make someone else think for them instead of them trying to resolve it themselves first, a lot of people will just copypaste the error here without reading it lool

#

just obtain wide brain

grizzled jackal
#

That's the feeling i've been getting, yeah. I don't understand why people don't at least attempt it themselves before bothering to ask

knotty steeple
#

seems as though its just copied and forgot to change client to whatever they defined it as

tulip tundra
#

you shoud use dark mode tho

slender thistle
#

That logically makes zero sense chadthonk

earnest phoenix
#

^

outer niche
slender thistle
#

It would if you were on the older version of discord.py

unique nimbus
#

yes

#

lmao

#

I remember using it

slender thistle
#

0.16.12 had that too

unique nimbus
grizzled jackal
#

duz this mack more since

#

what even

slender thistle
#

Let's not get off the path and have unnecessary headache

outer niche
slender thistle
#

Read the docs

unique nimbus
#

if it is 1.X.X then it won't work

outer niche
#

what

tulip tundra
#

you don't know what you re writing

unique nimbus
#

print( discord.__version__)

#

can you eval this

tulip tundra
#

i guess not

outer niche
#

What would I need to change this to because that is the older version I can't find the new version

sick cloud
#

what sort of intervals are suggested for clearing caches

slender thistle
#

Docs are helpful

earnest phoenix
#

we are practically spoon feeding him if we get any further

outer niche
#

I looked at them but I'll look again

earnest phoenix
#

everyone can code, but only if they put the effort in imo

slender thistle
#

Not everyone's mindset is like that

earnest phoenix
#

everyone can code, but not everyone can program

#

some people just can't do logical thinking and resolve problems quickly in a logical way

outer niche
#

I cannot find it in voice changes

tulip tundra
#

python.__isbad

slender thistle
#

Depends why it is bad

unique nimbus
#

And its a preference

supple siren
#

hello

slender thistle
#

@earnest phoenix Do you think moving from Python to C won't be too bad?

earnest phoenix
#

c is a very old language

outer niche
#

I cannot find it in voice changes @slender thistle

earnest phoenix
#

but, with enough effort you can always learn it

#

it will be weird moving from python syntax to c syntax but its possible

slender thistle
#

I've heard I will need C for Arduino

earnest phoenix
#

yeah, arduino is heavily based around c/c++

#

it's also a great way to learn the language through playing around

#

as you can have visual physical output

slender thistle
#

Sounds good :p

#

thanks

slim heart
#

whats a good name for a less sensitive config sorta thing?

amber fractal
#

less sensitive config?

slim heart
#

yeah like, right now in my config i have tokens, but also things like site links etc.

#

and i wanna move it to a separate config

#

then just combine the two at init

amber fractal
#

settings mmLol

earnest phoenix
#

variables

outer niche
earnest phoenix
#

^^^^^^^^^^^

sick cloud
#

is there a way to force a query param onto vote urls from the bot page

outer niche
#

yes

earnest phoenix
#

thats what i was gonna say

#

lol

slender thistle
#

Mind sharing archive of that stuff if you have one, cry

earnest phoenix
#

it's all in my brain 🙃

outer niche
#

Idk what to do

earnest phoenix
#

think

#

and make a logical connection why it says that error

outer niche
#

I can read I'm not that dumb I don't know what to do to fix it

loud salmon
#

@outer niche try reading the thing line by line

outer niche
#

I did

earnest phoenix
#

it doesn't have a singular guild property because your client can be in more than one guild

loud salmon
#

@outer niche did you read the last line

outer niche
#

yes

unique nimbus
#

bruh

outer niche
#

so what do i need to do

unique nimbus
#

have you read the error

outer niche
#

yes i do not know how to fix it

sudden geyser
#

If you don't know how, you should attempt it later with more knowledge imo

slender thistle
#

I linked the docs

earnest phoenix
#

what is the opposite of singular

west spoke
#

multiple

earnest phoenix
#

shhhhhh that was on them to answer

#

i'm teaching basic english here

#

singular - there is only one - guild
plural - there are multiple - guilds

west spoke
#

Never thought cry would teach english and coding at the same time

#

That's a first

earnest phoenix
#

should get paid tbh 🙃

west spoke
#

Yeah

#

you should

tepid hedge
unique nimbus
#

oh come on its the 2nd line and my js skills is shit

outer niche
#

Still have not figured out how to fix it

tepid hedge
#

k

grim aspen
tepid hedge
#

yeah i realized that

unique nimbus
#

yes

slender thistle
#

You better not copy the client secret :p

amber fractal
#

wait

short siren
#

I'll anime you

earnest phoenix
#

how nice would it be if people would just read

amber fractal
#

I dont even know py and I know what that first error is...

tepid hedge
#

the only thing is is that its using the right login details

amber fractal
#

then regen your token

tepid hedge
#

ok

sudden geyser
#

are you using the bot or client token

earnest phoenix
#

make sure you're using your token, not your secret

slender thistle
#

Are you sure your token was copied properly

tepid hedge
#

im using the token

outer niche
#

@amber fractal They may be simple for you but for other people they may not be

amber fractal
#

It's in plain english...

tepid hedge
#

regened token its still incorrect

amber fractal
#

bot has no attribute guild

sudden geyser
#

all you have to do is read it.

earnest phoenix
#

in rare cases where your bot token spams the gateway, discord will manually reset your token as an anti abuse measure, check your email for that

outer niche
#

And I still have no idea how to fix that even though that I've been working at this for 5 hours

#

So yeah not a simple error for me

grim aspen
#

sigh

slender thistle
#

Someone apparently needs a bit of python basics learnt

amber fractal
#

docs are a wonderful thing

unique nimbus
#

yes

earnest phoenix
#

it's not even language basics

#

it's just knowing how to english 101

slender thistle
#

Yuh

earnest phoenix
#

i already explained this before but they keep on ignoring me

#

or they might have me blocked

tepid hedge
#

most likely blocked

amber fractal
#

It means, in plainer English, the object, called 'Bot', has no property 'guild' (Bot.guild doesnt exist).

earnest phoenix
#

you can't use guild, it's singular and a bot can be in multiple guilds, therefore read the docs or make a logical decision to use the plural form of guild which is guilds

#

s

tepid hedge
#

oh i just read his thing dont know why hes not listening to you

outer niche
#

So basically I need to delete that

slender thistle
#

In this case, they need voice_client, attribute of a Guild instance

#

Which I linked before special_think

grim aspen
#

snipe

outer niche
earnest phoenix
#

jesus christ

slender thistle
#

Nononono

#

You don't know basic python do you

earnest phoenix
#

i can't tell if this is trolling at this point how the hell do you have a bot dev role

grim aspen
#

a space is not needed

earnest phoenix
#

wait

#

bot makers

#

right

slender thistle
#

norole :p

earnest phoenix
#

i forgot those exist

grim aspen
#

@outer niche what are you using to make your bot

outer niche
#

Python

unique nimbus
#

@outer niche Do you know python

#

like at all

outer niche
#

Yes

slender thistle
#

Welp, that's straight up lies

unique nimbus
#

then you would know why it isnt working

#

that is an easy error to fix

outer niche
#

How do you think of a fully functioning bot

unique nimbus
#

Making a bot shouldn't be for beginners

grim aspen
slender thistle
#

I'm giving the solution for like the third time

earnest phoenix
#

your bot was most likely made in a bot maker lol

slender thistle
#

If only you knew basic Python

unique nimbus
#

ye

tepid hedge
#

cry those exist?

unique nimbus
#

yes

#

many

#

we don't accept them

slender thistle
#

DBL is full of bots made with bot makers

unique nimbus
#

yes

grim aspen
#

we don't accept, yet they're accepted anyways

tepid hedge
unique nimbus
#

yes

#

that is a bad idea

tepid hedge
#

why is this a thing

slender thistle
#

DBM is accepted

unique nimbus
#

oh

grim aspen
#

no coding

earnest phoenix
#

i just took a look at their bot

grim aspen
#

that's the red flag you should read

earnest phoenix
#

poor command handling and basic commands which are a sign of a bot maker

outer niche
slender thistle
#

There's

tepid hedge
slender thistle
#

Wait

#

It's not a function at all

#

where are you getting the parentheses from

#

Good Lord we got somewhere

outer niche
earnest phoenix
#

agenttToday at 12:36 AM
no coding
you'd be surprised how many people submit bots made over bot maker apps which have like 10% uptime loool

grim aspen
#

there's a difference between function and property

slender thistle
#

a function and a property*

tepid hedge
#

@earnest phoenix my bot has been online in forever because i stopped coding and then i got back into it

grim aspen
#

yeah fuck i realized what i said

#

a function is telling the bot to do an action

outer niche
#

I give up

grim aspen
slender thistle
#

This is what you get when getting to a not beginner-friendly library without learning the language first

outer niche
#

I have learned the language

slender thistle
#

How much have you learned it

outer niche
#

It is why I had developed over 50 bots

slender thistle
#

...

earnest phoenix
#

lol

#

after a bit of research

#

that isn't even their code

slender thistle
#

yet you can't logically figure out this?

earnest phoenix
#

they stole it from SO

unique nimbus
#

ffs

slender thistle
#

That's also the one that appears in Lucas' video about music commands in d.py iirc

unique nimbus
#

yes

grim aspen
#

50 bots

#

Now I know that’s a full on lie

earnest phoenix
#

split 50 commands per 1 token :wesmart:

unique nimbus
earnest phoenix
#

Is it allowed to link several bots to a single code?

#

what u mean?

#

@earnest phoenix

#

Wait

#

Auth code?

#

Use several bots tokens on a single code

#

Example

#

4 bots discord on 1 code

grim aspen
#

i don't think so

earnest phoenix
#

Okay

slim heart
#

actually i think u can

#

maybe

#

u just have to run that file with new clients

#

then change the token

earnest phoenix
#

I can use a tokens.txt for list tokens of my bots lol

#

Why would u?

sharp pilot
#

what's the use case? i don't know why that'd not be allowed unless it was for abuse reasons

#

but it'd still not be recommended

earnest phoenix
#

The only thing that would change would be the prefix of each bot

#

It avoids using shards

slim heart
#

um

sharp pilot
#

so are you running 4 bots with the exact same code but with different tokens?

slim heart
#

why not just shard lmao

earnest phoenix
#

lmao?

#

@sharp pilot no this is an idea

slim heart
#

what an absolute brain lit

#

dont do this

#

ever

sharp pilot
#

that'd probably take up more resources than sharding
and would also cause problems with the bots communicating data back and forth

earnest phoenix
#

Oh

#

Okay

sharp pilot
#

if you were running 4 different bots with different functions from 1 codebase that'd be different
but yeah don't do that

slim heart
#

it likely wouldnt even work because people will invite over the bots server limit unsharded or not.

earnest phoenix
#

Note:
DON'T USE SEVERAL TOKENS IN ONE CODE

slim heart
#

tho i doubt if this is your idea your bot will go anywhere

sharp pilot
#

or just
note: use sharding, it'll help you

earnest phoenix
#

If you want better performance, thats the shards entire meaning.

slim heart
#

because this is just dumb mmLol

hushed berry
#

Shards dont give you better performance @earnest phoenix Thonk

#

It just makes your points of failure smaller and more numerous

slim heart
#

better performance then splitting multiple bots

hushed berry
#

Yeah, absolutely

earnest phoenix
#

i didnt mean in normal a normal situation

hushed berry
#

It's not even a real solution if im being honest

earnest phoenix
#

i meant from his perspective

sharp pilot
#

that's what's being talked about

hushed berry
#

Yeah ik

sharp pilot
#

sharding vs running several bots

hushed berry
#

I just wanted to clarify that sharding doesnt magically increase performance :p

earnest phoenix
#

no ikr

sharp pilot
#

ahhh yeah

slim heart
#

nikki you'd find a way to make sharding have better performance

earnest phoenix
#

lmao

slim heart
#

why not just send git link

earnest phoenix
#

Because I don't have it anymore I only have the zip

#

4.02kb?

#

"an free sharded bot created on node.js whit discord.js"

#

U sure this guy legit?

#
shard.spawn(2);```

But if i want make
```js
shard.spawn();``` this is good?
slim heart
earnest phoenix
#

Okay ty

#

Is your bot in +/- 2000 guilds @earnest phoenix ?

#

No

#

:)

#

Its good to be aware of how it works but, like the topic says, under that amount of guilds you should wait.

#

But the sharding is interesing

#

Yep

#
    if (command === 'stats') {
-        return message.channel.send(`Server count: ${client.guilds.size}`);
+        return client.shard.fetchClientValues('guilds.size')
+            .then(results => {
+                return message.channel.send(`Server count: ${results.reduce((prev, guildCount) => prev + guildCount, 0)}`);
+            })
+            .catch(console.error);
    }```

But just by looking at this example, I'd already be afraid of having to recreate the orders.
hushed berry
#

You'd have the same issue if you ran multiple bots though?

earnest phoenix
#

Many robots would not ask to have shards so it would be easier even if it would require more resources...

hushed berry
#

Would you not also have to aggregate the results of all the bots to produce a total guild count?

earnest phoenix
#

Yes

slim heart
#

that'd just be even more difficult lol

earnest phoenix
#

Really?

slim heart
#

yes

#

you'd have to do your own communication between multiple processes

#

and would be pretty much the exact same thing

earnest phoenix
#

Mmmh

#

Yes

slim heart
#

as in it'd be the same code as what you see pretty much

#

just even more difficult

earnest phoenix
#

Okay

#

But how do I remove the shard that is displayed on my bot page?

slim heart
#

huh?

#

oh

#

make it not an array when ur doing a post

earnest phoenix
#

Okay

sick cloud
#

sharding is real easy

#

using the sharding manager is a pain in the ass so if you're on master just use internal sharding

earnest phoenix
#

Lol "easy" for you

sick cloud
#

i had to rush shard my bot at 2400 servers and trust me, it took a bit

#

but it's not the end of the fucking world thing you can take it to be

#

you're just telling your bot to launch differently and replacing a bit of a code

#

most of the code replacement being broadcastEval only, like in the stats example

#

and with internal sharding now you just tell it how many shards to spawn and there you go nothing needs changing

slim heart
#

also an 8 server bot is not worth sharding

sick cloud
#

honestly i'd argue that berry

opaque eagle
#

All my bots have sharding code in them, which I can turn on using a feature flag

sick cloud
#

i have my new bot that's only in 15 servers sharded, it depends on the feature set

#

like for me i like sharding done early on bots that might have issues when you shard (such as with music)

slim heart
#

having code set up to do it is nice but actually sharding at small servers is just dumb and leads to performance decreases

sick cloud
#

sharding doesn't affect performance at low levels

earnest phoenix
#

I didn't say I was going to do it, I'm going to repeat myself how many times to say I'm just interested? @slim heart 😑

sick cloud
#

you're only spawning 1 shard unless you're an idiot, so there's no difference there, and really it doesn't change much

#

the benefits outweigh the apparent 'disadvantages'

slim heart
#

no i mean like spawning more than 1 shard lol

sick cloud
#

<2500 servers you won't spawn over 1

sudden geyser
#

only reason I'd see sharding is to get ready for it

#

but using more than 1 shard for 2.5k is pointless like others said

quartz kindle
#

I made my own sharding system that can mix external and internal sharding, to future proof my bots

#

Probably wont ever be needing it tho lul

#

But its good to future proof

#

Also, discord starts recommending shards at 1.5k

#

If you set your shard manager to auto, you will get two shards at 1.5k>

jaunty stump
#
nternal/modules/cjs/loader.js:584
    throw err;
    ^

Error: Cannot find module './config.json'

I am setting up files and folder like I have seen a lot of people doing on git hub instead of just dumping EVERYTHING into one .js file.

and I don't know if I am doing it right.
I have never done this before and I want to learn and not be told I am an idiot like I have by other people in different servers

eternal mesa
#

./ means look in the same directory as the current directory of the file you are executing from

#

../ means go back one directory and look there

#

so chances are, config.json is not in the same place as the file you are executing that from

#

@jaunty stump ^

jaunty stump
#

sorry. Just trying to figure it out
where should my config.json file go then.
if it is not working here?

eternal mesa
#

that is fine, where is that line of code

jaunty stump
#

I don't know.

grizzled jackal
#

Requiring the same file twice?

jaunty stump
#

someone here said to have one with prefix

#

I am still confused and don't know if I am even doing things right

grizzled jackal
#

Well as pointed out above, '../' looks for one directory back as opppsed to your './' so it all depends where your files are located

sudden geyser
#

You shouldn't need to require it twice. Use object destruction or set variables for that. I don't know why it'd say it's not found (seems to be same dir and package.json should be correct), but there seems to be a hint/notice under the first require. Does it say anything if you hover under it?

grizzled jackal
#

I believe it searches in a different directory first, I could be wrong

jaunty stump
#

it says File is a CommonJS module; it may be converted to an ES6 module.
@sudden geyser

amber fractal
#

tfw hentai.js

grizzled jackal
#

Unsure if this somehow causes your error but you're missing a semicolon at your second config require

earnest phoenix
#

it does not

sudden geyser
#

The semicolon would not matter. I'm still confused on how the file couldn't be found, but the only stuff I've come up with is where your app could have been spawn.

grizzled jackal
#

Ye I'm not seeing the error either

sudden geyser
#

Maybe it has to do with startup.bat (assuming it's something like nodemon) or your package.json

jaunty stump
sudden geyser
#

try making E-Bot -> e-bot. I don't believe you're allowed to have capitals.

jaunty stump
#

doesn't change anything

sick cloud
#

no -

jaunty stump
#

and it's never stopped any bot I make from stating

sick cloud
#

you can't have capitals or dashes in your package

jaunty stump
#

noted*

sick cloud
#

(it's because npm and node modules can't use them)

sudden geyser
#

npm supports - to my knowledge

jaunty stump
#

yea

sudden geyser
#

as for the code, I don't know. Someone else could possibly help. I'd try experimenting, but that's as far as I go

jaunty stump
#

This is also the fist time I am trying this type of thing.
I usually just throw stuff into one .js file and go

tepid hedge
#

sorry if im half blind but after doing this for a while i havent been able to fix anything, ive uninstalled and reinstalled the whole discord.js, uninstalled and reinstalled sqlite3 twice now, and it says its active, but wont start

#

then when I try to run npm install sqlite3 --save like it says, i get this

slim heart
#

Idk the logistics behind bindings and raspi

#

Your best bet might be to use a pure lang database

soft gazelle
loud salmon
#

click on New Application to create a bot app

tepid hedge
#

@loud salmon any chance you can help me with my error?

loud salmon
#

@tepid hedge u dont know node

tepid hedge
#

barely

loud salmon
#

wait

#

*i

#

thats what i meant to say

#

*i dont know node

soft gazelle
#

@loud salmon ok do u mind I can send you DMS?

tepid hedge
#

oh

loud salmon
#

@soft gazelle my dms are open for a reason mmLol

tepid hedge
#

im going to bed hopefully someone @s me while im sleeping

soft gazelle
#

Ok if I have a question I will message you

loud salmon
#

uh ok

eternal mesa
#

@tepid hedge you are not installing the library to your local directory

sick cloud
#

i'm making a dashcam using a webcam and a rpi

#

a decent 1080p dashcam costs $199 aud so i can get a good 1080p webcam for about $80 locally and an rpi zero w costs $20 so then i just gotta work the logic, power and storage out

#

and my dad can cut out some sort of custom casing for it

eternal mesa
#

thats pretty cool

sick cloud
#

but my question now is, what's the best way to go when you run out of storage? delete all and start again, record over existing, etc

#

it'll work out cheaper unit only and with a 128gb sd it'll be about $180

eternal mesa
#

i am no expert, but either a way to delete videos older that x amount of time

#

or overwrite

hushed berry
#

circular buffer

sick cloud
#

i was thinking to delete all and start again unless you tell it to freeze data (ie. save it all and don't overwrite, after an incident)

#

what's that

fiery stream
#

anybody know swift ui its pain in the ass they change it every year

#

new swift updates every year

tepid hedge
#

@eternal mesa so where exactly should I save it? I've installed to pi@raspberrypi as well

stray wasp
#

anyone got some reasons to consider switching from discordjs to eris?

urban oriole
#

Wait

#

Arent you the guy who made logger?

#

James bond right?

#

I use the bot to see the deleted messages lmao

earnest phoenix
#

Sorry, another basic stuff request, but how can I create an eval command for my bot?

#

?

#

wdym

#

I want to add my server to the site

#

but i don't know how to do it

#

Help me pls

#

click on the add server button and follow the instructions

#

oh k thats easy

#

Okey added but

#

throws back to the home page when I press here

#

Help me pls?

#

wait what is that

#

i dont make bots on phome

#

phone

#

click on the add server button and follow the instructions

#

^

#

I did them but it doesn't

#

@earnest phoenix

#

hm

#

Is the bot on your server?

#

(check the server)

#

No

#

Re invite the bot

#

invite me to ur server @earnest phoenix

#

I tried 3 times but it doesn't work @earnest phoenix

#

il do it for you

#

O

#

Invite us on the server

#

ye

#

@earnest phoenix ok

#

dm me

#

Samr

#

Is that the same account used for the website?

#

@earnest phoenix

#

@earnest phoenix help !?

#

Server id

#

Your invite, xd.

#

whooo ?

#

Not this one

#

Maybe you've specify a server id

#

And the server is not referenced in dbl

#

okay thx

#

The server must me on the list too.

#

And then you should have the ID of the page of the server.

#

For a unknow reason, my bot doesn't reply if the prefix is larger than one character (ex : $help works, but if I change the prefix to l!, l!help gives me an error message)

#

Note : nothing appears on the log

#

What do you use for the prefix?

#

Like char prefix or string prefix

#

If you use char prefix it's just one.

#

If you use string prefix you can pretty much use anything.

#

@earnest phoenix

#

In your commandhandler

#

Error message

#

(prefix changed to lb$)

#

(I don't want to rewrite my bot entirely)

#

It's not a huge bug, but it's embarrassing

sick cloud
#

i refuse to help people that use glitch

earnest phoenix
#

COME ON

#

@earnest phoenix

sick cloud
#

don't mention people for help either

earnest phoenix
#

i am a bit confused, lol

#

why do you code in glitch?

#

Because I don't have money to have a vps

#

instead of js, .net, .py, e.g.

#

And it's Java

#

Do you have an edu mail?

#

.js files

sick cloud
#

no, that's javascript

earnest phoenix
#

Edu mail ?

#

Education email

#

From your school

#

Erm yes

sick cloud
#

java wouldn't run on glitch if you forced it

earnest phoenix
#

Gives you free 50$ on DigitalOcean and 100$ on Azure.

sick cloud
#

for that $50 to work you need to pay $5 off paypal or a card to verify yourself

earnest phoenix
#

True

#

Not on Azure though.

sick cloud
#

yeah azure is fine, personally never used it though

earnest phoenix
#

k

#

Gonna check this later

vital lark
#

meh

earnest phoenix
#

Alright, goodluck.

vital lark
#

I would only use Azure for their Pipelines ci

earnest phoenix
#

I wouldn't even use it (at all) but if you don't have any money, its your solution.

sick cloud
#

i don't get the "i don't have money" argument

#

i can afford a cheap $10 vps off DO, it's only monthly

earnest phoenix
#

ye, you can easily get a vps for 5/10$

#

But if you're between 10 - 16 years old, there is a big chance your parents don't allow you.

#

Mine were always a bit difficult when it came to online expenses.

sick cloud
#

don't allow you

#

lol what

#

i'm 15 (had my vps since 13) and i've had no issues

earnest phoenix
#

Under the age of 18 any bank account is required to be supervised by your parents, (atleast in my country)

#

some of the parents just don't like it when you make expenses for games, e.g.

sick cloud
#

paypal exists

earnest phoenix
#

Hm

#

My school email address didn't receive the verification email

#

So I've use my personal email adress

#

🙏

#

I know what to ask for Christmas

wheat jolt
earnest phoenix
#

you tell me

wheat jolt
quartz kindle
#

these make it return undefined

#

also, there is nothing async in there, you dont need to make it an async function

wheat jolt
#

ah

topaz fjord
#

@vital lark azure cool

earnest phoenix
#

azure is a disaster for people that don't run a company

#

it drained all of my student credits within 2 weeks and i didnt even use their services

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

solemn harness
#

4

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

solemn harness
#

it's on c

sage bobcat
#

One message removed from a suspended account.

solemn harness
#

ok

sage bobcat
#

One message removed from a suspended account.

grim aspen
#

DV’s right, I’ve encountered that with my pc having 2 drives and having that bug, Node is wack

solemn harness
#

oh ok

#

thank you

earnest phoenix
#

or you can just add npm exe to your PATH variable

stray garnet
#

How can i send an Normal Message with an Embed?

earnest phoenix
#

i n

#

w h i c h

#

l i b r a r y

#

^

stray garnet
#

d i s c o r d . j s

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

earnest phoenix
#

thats irrelevant

grim aspen
#
earnest phoenix
#

also typescript isn't a version of javascript

#

it's a superset

stray garnet
#

@sage bobcat 10.15.3

grim aspen
#

oh shit

#

you have to update your packages

#

the current version 11.5.2

stray garnet
#

why

earnest phoenix
#

i'm pretty sure they're talking about node

#

discord.js 10.15.3 doesn't even exist iirc

stray garnet
#

Oh i was talkin about node version

grim aspen
#

oh

stray garnet
#

11.5.1 i use for d.js

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

and that is relevant to the problem how again

stray garnet
#

@sage bobcat how lol

grim aspen
#

they're asking about embeds i think

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

quartz kindle
#

node v10 is the current LTS version, its fine to use it

#

v12 should enter LTS sometime this year tho

#

maybe this month

#

when that happens, many npm libraries should move to v12 as well, and finally fix their v12 bugs (hopefully)

ebon crypt
#

Hi

tulip tundra
#

bye

lunar crystal
#

What is the utility of npm i-- sfs ?

mossy vine
#

npm i-- is not a valid command

#

but it installs the sfs package

#

(if you remove the --)

#

the package hasnt been updated in 6 years, and barely has any documentation

lunar crystal
#

I have already done it but thanks u as well 🙂

bronze fable
#

Anyone know how to add custom emoji to embed

cobalt umbra
#

lib?

mossy vine
#

oh my god you asked that 3 times now

#

and got an answer all of those times

faint bridge
#

oof

bronze fable
#

Anyone?

faint bridge
#

:name:id

mossy vine
#

<:name:id>

loud salmon
#

@mossy vine i told him to move it here

bronze fable
#

@mossy vine @faint bridge it dosent work

mossy vine
#

to get that easily, put a \ before the emoji

grim aspen
#

use: :emoji:

faint bridge
#

u sure?

grim aspen
#

fuck

bronze fable
#

<mmLol356831697385422848>

faint bridge
#

![coin](https://cdn.discordapp.com/emojis/593089956348559416.webp?size=128 "coin") example for one that my friend uses in his code

mossy vine
#

the a means its animated

bronze fable
#

:Thonk:

faint bridge
#

yeah

#

its static but just without the a

bronze fable
#

How can i get its id?

mossy vine
#

i told you

faint bridge
#

rip

bronze fable
#

:discord:

#

:discord:

faint bridge
#

for example

#

what emoji do you want?

#

i can give you the id

grim aspen
bronze fable
#

My bot should be in this server to use it

faint bridge
#

ur bot is not -_-

mossy vine
#

yes, the bot has to have access to the emoji to use it

bronze fable
#

:weirdsip:

mossy vine
#

are you on mobile?

faint bridge
bronze fable
#

Yes

grim aspen
#

you might also not have nitro

mossy vine
#

thats why it doesnt work lol

faint bridge
#

lol

bronze fable
#

Ok

grim aspen
#

the emoji has to be in this server or you can have nitro to have other emojis

bronze fable
#

My dad dosent allow me to use pc after 8pm

cobalt umbra
#

in Python you would just call

emoji = bot.get_emoji(ID)

then in string you use that emoji
but ye just hardcode the string what do I know 🤷

faint bridge
#

hes asking bout bots

#

you cant buy nitro for ur bot -_-

cobalt umbra
#

bots already have nitro

mossy vine
#

they dont

faint bridge
#

unofficially

bronze fable
#

@cobalt umbratickYes

grim aspen
#

i'm talking about getting the id of the emoji

mossy vine
#

they only have specific features users can only access with nitro

faint bridge
#

they can use animated emojis

cobalt umbra
#

they can see other emojis from other guilds and can use them no?

mossy vine
#

yes

faint bridge
#

with id yes

#

btw can bots have animated profile pics?

bronze fable
#

:-weirdsip

faint bridge
#

no

mossy vine
#

they cant

faint bridge
mossy vine
#

thats why i said they dont have nitro

bronze fable
#

It works

#

With :- this sings

faint bridge
#

:-:weirdsip:

#

??

bronze fable
#

On mobile

faint bridge
#

mobile is weird

grim aspen
#

wack

bronze fable
#

Weird means?

faint bridge
#

its just weird

#

cant define more well so dont ask for it

bronze fable
#

Weird means?

faint bridge
#

^

bronze fable
#

Ok

quartz kindle
#

weird means strange, unusual, not normal

bronze fable
#

@quartz kindle okThonk

faint bridge
#

mr wikipedia comes in

bronze fable
#

😂

mossy vine
#

how would i check my bots permissions in a channel in Eris?

earnest phoenix
#

Asked in the API server yet?

#

@mossy vine

mossy vine
#

nope

earnest phoenix
#

how do I see on what server my bot got invited to?

valid frigate
#

listen for a guild create event

mossy vine
#

the guild object is passed in the guild create event

valid frigate
#

most libs will pass in a guildLUL

earnest phoenix
#

your talking to me now

#

cuz im confuzed

drifting egret
#

what lib are you using?

earnest phoenix
#

and again

#

you talking to me?

drifting egret
#

yes

earnest phoenix
#

a

#

im kinda new to coding

#

so if you can ask me on my language

drifting egret
#

what language?

earnest phoenix
#

english but begginer coding

#

🙂

drifting egret
#

what coding language?

earnest phoenix
#

discord.js

#

js

drifting egret
#

@earnest phoenix
not used the lib before but looks like this will tell you what servers your bot is in
https://discord.js.org/#/docs/main/stable/class/Client?scrollTo=guilds

opaque eagle
#

TextChannel#permissionOverwrites and Member#permission @mossy vine

#

Also like how did u do it all these days

#

And suddenly forget

mossy vine
#

does permissionOverwrites only contain the bots permission?

slim heart
#

No it’ll probably hold something with the ID of user or role

opaque eagle
#

Check typings

#

Wait nvm

mossy vine
opaque eagle
#

Channel.permsOf() (abbreviating)

#

Yeah that

mossy vine
#

yeah thanks

opaque eagle
#

General rule of thumb... Eris has bad docs and even worse typings...

#

What I like to do is maintain my own bot framework that interacts with Eris

#

So you have to solve the problem once and never worry about it when working on another bot

mossy vine
#

i doubt im going to use eris for any other project

#

development is so much harder

peak bloom
#

eris docs aren't really bad lol

#

anyway it's mostly similar to djs aside from some stuff like perms

blazing saffron
peak bloom
#

what is that screenshot of

#

no hint to language or anything

#

can't even tell if it's docs for a library or some site's api

west spoke
#

@blazing saffron someone sent a link. You need some sort of website to run the webhook on.

blazing saffron
#

Thx

earnest phoenix
#

anybody facing with sqlite3 not working properly?

dusky marsh
#

In what way

#

We need more info than just 'not working'

hushed berry
#

@dusky marsh botum no workum. fixum?

dusky marsh
#

sa

tepid hedge
#

@earnest phoenix yep, your not the only one

earnest phoenix
#

it got my bot f'ed up

#

now i gotta wait until its fixed

tepid hedge
earnest phoenix
#

can you send me the server link

#

of that?

dusky marsh
#

Where are you installing through npm

#

That's just a system install of sqlite

tepid hedge
#

I installed there and at pi@raspberrypi

earnest phoenix
#

sqlite3 is giving a error

tepid hedge
#

And on the direct sqlite3 folder

earnest phoenix
#

con.run is not a function???

dusky marsh
#

afaik sqlite bindings for node are kinda iffy on rpis

tepid hedge
#

Ik

earnest phoenix
#
const sql = require("sqlite3");
const db = new sql.Database("bot.sqlite");
console.log("Initialized database connection.")

const tables = {
    warnings: [
        "id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL",
        "snowflake TEXT NOT NULL",
        "reason TEXT NOT NULL",
        "warner TEXT NOT NULL",
        "guild TEXT NOT NULL",
        "time INTEGER NOT NULL"
    ],
    bans: [
        "id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL",
        "snowflake TEXT NOT NULL",
        "guild TEXT NOT NULL",
        "unbannedAt INTEGER NOT NULL"
    ],
    mutes: [
        "id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL",
        "snowflake TEXT NOT NULL",
        "guild TEXT NOT NULL",
        "unmutedAt INTEGER NOT NULL"    
    ]
}

for(let table in tables) {
    sql.run(`CREATE TABLE ${table} (${tables[table].join(", ")})`, () => {
        console.log(`Initialized table "${table}".`);
    });
}

module.exports = db 
#

this code worked perfectly never had a error

tepid hedge
#

This bot works fine on my laptop but when I put it on rpi it breaks

earnest phoenix
#

until sql.run is not a function

dusky marsh
#

It's be db.run

#

You can't run any queries on the sqlite import 😛

earnest phoenix
#

oh wait

#

😂

#

didn't realize that xd

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

@sage bobcat show me

sage bobcat
#

One message removed from a suspended account.

earnest phoenix
#

you using fs to read the json file?

sage bobcat
#

One message removed from a suspended account.

#

One message removed from a suspended account.

#

One message removed from a suspended account.

unique nimbus
#

that is I

earnest phoenix
#

what language?

sage bobcat
#

One message removed from a suspended account.

unique nimbus
#

twa