#development

1 messages · Page 1386 of 1

earnest phoenix
#

uns = collection.find()
print(uns)

slender thistle
#

Yes

#

You can use .sort on the Cursor, as far as I remember

#

which will then give you an iterable with sorted values

drifting wedge
#

my mongodb is getting ~ 1-2 connections per second lmao

earnest phoenix
#

or if i do collection.find().sort() i get dictionary?

slender thistle
#

connections?

#

.sort is a methid

#

method, a function

#

you need to pass proper sorting options to it

#

p.s. see pymongo cursor sort

earnest phoenix
#

let me try

#

cord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: sort() missing 1 required positional argument: 'key_or_list'

#

on uns = collection.find().sort()

#

@slender thistle

slender thistle
#

you people ever just go to google and search up your errors

#

or like

#

read documentations

earnest phoenix
#

so i dont annoy people?

slender thistle
#

yeah, and it helps you save your own time

#

and you learn be more independent

earnest phoenix
#

yes i am sorry i just discovered you can annoy people on discord with your errors

#

i am new

umbral zealot
slender thistle
#

Well, it's more of a strong suggestion

earnest phoenix
#

Please help me. I have an error.
command:

    if(command === 'new'){
        let ruser = message.reactions.cache.get('🎰').users;
        if(!message.author.id == 500933509859246100)return;
        message.delete({timeout: 0});
        message.channel.send(allarg).then(function(message){
            message.react('🎰').then(ruser.add(role))
        })
    }```
error: https://cdn.discordapp.com/attachments/272764566411149314/777287397355683850/unknown.png
drifting wedge
#

can i be mongo ratelimited?

earnest phoenix
drifting wedge
#

i just tried to inster like 450 thingys in 1 second

#

and it errored

#

rarelimit?

earnest phoenix
#

oh i get it now

slender thistle
#

And yeah, see Evie's link. Help yourself be an independent developer and get used to doing research on your own

earnest phoenix
slender thistle
#

and it errored
@drifting wedge what did it say

earnest phoenix
#

it works but... why is the latency so high?

drifting wedge
#

pymongo.errors.OperationFailure: bad auth : Authentication failed., full error: {'ok': 0, 'errmsg': 'bad auth : Authentication failed.', 'code': 8000, 'codeName': 'AtlasError'}

umbral zealot
#

@earnest phoenix what this is saying is that the get() returns undefined - which means, no one has reacted to the message using that emoji.

drifting wedge
#

latency != ping

earnest phoenix
#
    name: "ping",
    description: "Pinging the bot",
    execute(message, args) {
       var latency = -1 * (Date.now() - message.createdTimestamp)
       message.channel.send('Bot latency is ' + latency + ' ms');
    }
};
#

thats my ode

slender thistle
#

Interesting

drifting wedge
#

like its not ur bot speed

earnest phoenix
#

then...?

drifting wedge
#

can it be wrong mongourl?

slender thistle
#

Well I mean

#

I can yell at you for improper auth

earnest phoenix
#

how to ping then?

drifting wedge
#

imporper?

earnest phoenix
#

@earnest phoenix what this is saying is that the get() returns undefined - which means, no one has reacted to the message using that emoji.
@umbral zealot so i need to use find()?

slender thistle
#

but that might not be the case if you claim that it happens when you spam requests at Atlas

umbral zealot
#

No you need to actually code it so it doesn't crash if the . get() returns undefined.

drifting wedge
#

well i did spam it lol

slender thistle
#

And I somewhat doubt Atlas will throw BadAuth for ratelimits

umbral zealot
#

if you used .find() you'd still get undefined if no one reacted.

drifting wedge
#
        user_info = {"_id": guild.id, "isinguild": "true"}
        collection6.insert_one(user_info)```
earnest phoenix
#

@drifting wedge then how do i make a ping?

slender thistle
#

Unless your auth key got reset by itself lmfao

drifting wedge
#

prob why it happenined

slender thistle
#

insert_many ftw tbh

drifting wedge
#

oh lmao

slender thistle
#

which technically doesn't make any difference for shit functionality-wise afaik

#

but...

drifting wedge
#

raise TypeError("%s must be an instance of dict, bson.son.SON, "
TypeError: document must be an instance of dict, bson.son.SON, bson.raw_bson.RawBSONDocument, or a type that inherits from collections.MutableMapping

earnest phoenix
#

No you need to actually code it so it doesn't crash if the . get() returns undefined.
@umbral zealot So what i need to do? i don't know that

umbral zealot
#

Do you not know how to create conditions?

slender thistle
#

wha

#

What did you do exe

drifting wedge
#

why?

earnest phoenix
#

em.

#

no?

stable nimbus
#

Is there anybody else that uses MySQL that could help me with something?

drifting wedge
#
@client.event
async def on_ready():
    print('Bot is loaded/ready.')

    mongo_url6 = "url"
    cluster6 = MongoClient("no leakies pls")
    db6 = cluster6["isinserver"]
    collection6 = db6["main"]

    for guild in client.guilds:
        user_info = {"_id": str(guild.id), "isinguild": "true"}
        collection6.insert_many(user_info)```
#

this is the bot code

#

basically

slender thistle
#

I'll specifically murder you for a TypeError in pymongo and write a note that said "Incompatible type (Human) with class World"

earnest phoenix
#

Do you not know how to create conditions?
nope

umbral zealot
#

@earnest phoenix Useful links for learning JavaScript and Node:

Javascriptinfo: https://javascript.info/
Codecademy: https://www.codecademy.com/learn/javascript
FreeCodeCamp: https://www.freecodecamp.org/
Udemy: https://www.udemy.com/javascript-essentials/
Eloquent JavaScript, free book: http://eloquentjavascript.net/
You-Dont-Know-JS: https://github.com/getify/You-Dont-Know-JS
NodeSchool: https://nodeschool.io/
CodeSchool: https://www.codeschool.com/courses/real-time-web-with-node-js
Evie's Accelerated JS: https://js.evie.dev/

drifting wedge
#

so what can i do?

#

do i go thru each id by itself?

#

and add it?

#

its like 450 ids so i prefer to do it auto

slender thistle
#

insert_many([{"_id": str(guild.id), "isinguild": True} for guild in client.guilds])

drifting wedge
#

ty papi

slender thistle
#

Honestly I don't think this is even worth a try at this point

#

but you never know

#

:^)

earnest phoenix
#

Bruh

slender thistle
#

(Just apply a change every 0.5-1 seconds)

drifting wedge
#

so add asyncio sleep?

#

asyciosleep .5?

earnest phoenix
#

how i can merge 2 dictionaries
like this:

{'a': 1, '_id': ObjectId('54ff30faadd8f30feb90268f'), 'b': 2}
{'a': 1, 'c': 3, '_id': ObjectId('54ff32a2add8f30feb902690'), 'b': 2}

#

@earnest phoenix Useful links for learning JavaScript and Node:

Javascriptinfo: https://javascript.info/
Codecademy: https://www.codecademy.com/learn/javascript
FreeCodeCamp: https://www.freecodecamp.org/
Udemy: https://www.udemy.com/javascript-essentials/
Eloquent JavaScript, free book: http://eloquentjavascript.net/
You-Dont-Know-JS: https://github.com/getify/You-Dont-Know-JS
NodeSchool: https://nodeschool.io/
CodeSchool: https://www.codeschool.com/courses/real-time-web-with-node-js
Evie's Accelerated JS: https://js.evie.dev/
@umbral zealot You can't tell me what i need to do :c?

slender thistle
#

Ehh but get back to insert_one if you do that

umbral zealot
#

No. I don't code for other people. We don't spoonfeed here.

earnest phoenix
#

Hello

crimson vapor
#

tf

drifting wedge
#

Ehh but get back to insert_one if you do that
@slender thistle i mean can i just do many?

earnest phoenix
#

I don't want the code

drifting wedge
#

and not wait?

#

ehh whatever

slender thistle
#

Fuck it

drifting wedge
#

itll be like 4 mins

slender thistle
#

Try it

drifting wedge
#

whatever

earnest phoenix
#

I just wanna know how can i fix it.

#

you to me or him

drifting wedge
#

ill do insert 1 waiting for .5 secs

slender thistle
#

😂 good luck man

drifting wedge
#

ill let u know

earnest phoenix
#

how i can merge 2 dictionaries
like this:

{'a': 1, '_id': ObjectId('54ff30faadd8f30feb90268f'), 'b': 2}
{'a': 1, 'c': 3, '_id': ObjectId('54ff32a2add8f30feb902690'), 'b': 2}

drifting wedge
#
    raise TypeError("%s must be an instance of dict, bson.son.SON, "
TypeError: document must be an instance of dict, bson.son.SON, bson.raw_bson.RawBSONDocument, or a type that inherits from collections.MutableMapping```
umbral zealot
#

Of course you want the code. You need to make a condition on the thing being undefined. IF you don't understand what "make a condition on the thing being undefined" means, there is literally no other choice than either give you the answer, or tell you to learn javascript so you can fix it yourself.

earnest phoenix
#

okay fine

drifting wedge
#
for guild in client.guilds:
        asyncio.sleep(0.5)
        collection6.insert_one([{"_id": str(guild.id), "isinguild": True} for guild in client.guilds])```
slender thistle
#

What the faq

drifting wedge
#

-faq 1

slender thistle
#

oh yeah

#

you simply

#

silly

#

pass a dictionary, not a list comprehension

#

Ignore list comprehensions for your case

earnest phoenix
#

man doing insert one with multiple dicts and insert many with a dict

#

gj

drifting wedge
#

for guild in client.guilds
guild1 = dict1 = [guild.id]

#

wat did i just type

#

lmao

slender thistle
#

I didn't get what you wanted to-yeah

drifting wedge
#

for every guild

slender thistle
#

just insert_one(yourdicthere)

drifting wedge
#

i want to set it in the db

#

that it is in the guild

#

thats what i want

#

cuz for dashboard

#

dictpp = {}

earnest phoenix
drifting wedge
#

wadda fuck!

umbral zealot
#

Can y'all stop being dicts 😂

drifting wedge
#

how do i make the guild ids a dict then:

earnest phoenix
#

what even are you trying to achieve

slender thistle
#

Evie plz I'll I'll legitimately del you to the point you will cause a ReferenceError

#

how do i make the guild ids a dict then:
@drifting wedge see your previous code snippet

drifting wedge
#

@earnest phoenix i want to put all the guilds the bot is in in a db

slender thistle
#

like the very first one you sent

drifting wedge
#

ye

#

thats a dict

slender thistle
#

Well yeah

#

Use that

#

except with a delay

drifting wedge
#

alr cool ty

#

raise OperationFailure(msg % errmsg, code, response,
pymongo.errors.OperationFailure: bad auth : Authentication failed., full error: {'ok': 0, 'errmsg': 'bad auth : Authentication failed.', 'code': 8000, 'codeName': 'AtlasError'}

#

still

slender thistle
#

Does that happen on any operation

#

Even if you do a single request

wicked pivot
#

heyo i'm in the dev of a hangman but i still lack a little experience in js, so i have two variables.
A variable that has the word (item)
and another which has the text that the player sees example: ___ e__

now I don't know how I can replace the text with the letter in what the player sees.

if(item.indexOf(message.content)){
let a = item.indexOf(message.content)  
}else{

}```
digital ibex
#

use replace

timber merlin
#

ayo so for the dblapi for node

#

how do the webhooks work cuz im tryna do that rn

digital ibex
#

or r u trying to make a webhook which isnt related to dblapi?

timber merlin
#

yep

#

still have no idea how to do it tho

wicked pivot
#

@digital ibex can we replace with a number?

digital ibex
#

yes

wicked pivot
#

How ? js itemview.replace("??", message.content)

digital ibex
#

show more of ur code so i can have an idea of what ur workin with

#

the part where the user sends a letter

wicked pivot
#
awaitMessage(msg.channel, m => m.author.id === message.author.id, 60000).then(message => {

                message.delete()

                if(lettre.indexOf(message.content)){
                    game()
                    return message.channel.send("Vous avez déjà mis cette lettre.").then((msg) => msg.delete({timeout: 5000}))
                }
                lettre.push(message.content)
                if(item.indexOf(message.content)){
                    let a = item.indexOf(message.content)
                    
                }else{
                    if(lettreerror == 10){

                    }else{
                        lettreerror++
                    }
                }


    
            })```
green kestrel
#

Did someone ping me here?

drifting wedge
#

i did

#

brain, there was a scam link

#

marco took care of it

#

@slender thistle py user_info = {"_id": "no no no noob", "isinguild": "true"} collection6.insert_many(user_info) this is the code

#

gave error

#
  raise TypeError("%s must be an instance of dict, bson.son.SON, "
TypeError: document must be an instance of dict, bson.son.SON, bson.raw_bson.RawBSONDocument, or a type that inherits from collections.MutableMapping```
slender thistle
#

_one not _many

drifting wedge
#

oh lmao lemme try

#

raise OperationFailure(msg % errmsg, code, response,
pymongo.errors.OperationFailure: bad auth : Authentication failed., full error: {'ok': 0, 'errmsg': 'bad auth : Authentication failed.', 'code': 8000, 'codeName': 'AtlasError'}

#
    user_info = {"_id": "772089684465418240", "isinguild": "true"}
    collection6.insert_one(user_info)```
earnest phoenix
#

i need help

wicked pivot
#

@digital ibex ?

earnest phoenix
#

what does this mean

#

TypeError: 'set' object is not a mapping

#

theres nothing about it on google

#

Reeee

#

nvm it works

ornate tree
#

Who has experience with Discord-XP? And Canvas...

#

I have the rank card sorted but need to get the rank using that below what would the getYourRank(); be?
const rank = getYourRank();
But I’ve tried Levels, Level and Rank but didn’t want to work.

eternal solstice
#

cant add another else here

#

idk why

ornate tree
#

Umm

#

On problems tab what does it say

#

@eternal solstice

eternal solstice
#

it wont let me put another } else {

#

so i couldnt know

ornate tree
#

But at the bottom it says Problems should say what the error is on there

eternal solstice
#

ok lemme send it

ornate tree
#

Try adding the else somewhere else maybe under that one?

eternal solstice
#

Try adding the else somewhere else maybe under that one?
@ornate tree i tried

#

didnt work

ornate tree
#

Umm sorry I can’t help any further

#

Won’t just guess lol

eternal solstice
#

rip

ornate tree
#

Sorry..

#

Anyway hope your bot goes well and goodnight! 👍

eternal solstice
#

ty u too

ornate tree
#

Th

#

Thx

lilac glen
#

Hello how do i join voice?

main trench
#

hey so im making a embed command and it works fine with no errors except i was wondering how to split the args basically let Title = args.slice(0).join(" ") this is the code i have for the title part but i was wondering how to split it from args[1] so this doesnt happen

#

anyone know any solutions?

#

@lilac glen to join a voice channel just click on its name

lilac glen
#

Ok thanks

earnest phoenix
#

hey

#

How can I make an image send only through an nsfw channel in discord.js

main trench
#

like command?

earnest phoenix
#

yeah

#

like

#

/nsfw

rustic nova
#

check if the channel is nsfw

main trench
#

you will 1. need a module that supplies the nsfw images and 2. code it to check for if the channel is a nsfw channel or not

earnest phoenix
#

so

#

how tf can i make an command thats check for if the channel is a nsfw channel or not

main trench
#

just look up a Second to Minute calculator

rustic nova
#

millisecond*

main trench
#

ah

earnest phoenix
#

yea i assumed they are ms and checked it says 30mins

rustic nova
earnest phoenix
#

i just wanted to confirm

#

js?

#

oh yeah

earnest phoenix
#

why he repeats the message 4 times

hollow sedge
#

code? @earnest phoenix

earnest phoenix
#

oh ok

#

wait a sec

#

👍

modest crane
#

looks like multiple instances

earnest phoenix
#

lemme see

#

no

#

There's no multiple instances

sudden geyser
#

You're adding a listener for every time run is invoked.

earnest phoenix
#

like what?

severe gyro
#

on every message, you are setting up the message listener once more, so it will run as many times as the command already ran

#

oh, wait

#

no

#

weird

#

how many times do you call .run()?

earnest phoenix
#

1 time

#

👍

#

or idk

tired hazel
#

Hi, im making a mute rol command, but i got error in console, the line of the error is:

role.setPermissions( 
role.permissions - (1 << 21)
)```

And the error is:

```js
(node:12436) UnhandledPromiseRejectionWarning: RangeError [BITFIELD_INVALID]: Invalid bitfield flag or number.```
earnest phoenix
#

like this

sudden geyser
#

You can use HTML & CSS in the long description.

earnest phoenix
#

i need help...

#

i cannot code in CSS nor HTML

#

umm, then learn how to code in CSS or HTML

#

they're both easy

#

....

#

i dont know code eitherthas why i have my friend help me ;-;'

#

you don't know how to code?

#

im dumb

rustic nova
#

If you do not know how to use css or html, then you are unfortunately not able to do this yet

earnest phoenix
#

im dumb
@earnest phoenix great achievement

#

;-; so nobody can help me

rustic nova
#

i suggest looking up a few tutorials on how to do this

#

We don't spoonfeed here, that's why

#

we can only link you to resources that might help you

earnest phoenix
#

please...

#

Send me a link please*

#

use google

rustic nova
grave vortex
#

Does anyone know the code to add verification for a bot on discord.js?

rustic nova
#

Verification?

#

that check mark?

grave vortex
#

Yes

rustic nova
earnest phoenix
#

i cannot learn code

grave vortex
#

Like when you join the server and react with a checkmark to verify

rustic nova
#

ohh

grave vortex
#

and get a role

earnest phoenix
#

I have a very high level of adhd

#

.........

grave vortex
#

me too

earnest phoenix
#

i cannot think straight

rustic nova
#

@earnest phoenix i do so too, but i managed to get past it through concentration and focus

grave vortex
#

So do you happen to know the code for that for discord.js

rustic nova
#

and maybe a bit of meditation

#

Not code, but i can tell you roughly how you can do that

grave vortex
#

Its alright

earnest phoenix
#

well i have a very bad adhd to the point i cannot think. at the momemnet

#

i take medication to help adhd but it lats for a few hours

grave vortex
rustic nova
#

@grave vortex you could store your message id inside a variable and then check on react if that message has the id you stored, then get the reaction and do your code

grave vortex
#

Alright

#

Thank you I will try that out

earnest phoenix
#
...
</body>
#

will this work?

grave vortex
#

Depends what coding program your using

earnest phoenix
#

for color

#

i am trying to change color on my bot page

rustic nova
earnest phoenix
#

but i am too dumb

rustic nova
#

you can use <style> inside your long description to change stuff on your bot page

earnest phoenix
#

i know

#

i just want my whole page a color and my buttons customized

#

i have floating icon code

#

but i want button color code

#

howwww

rustic nova
#

your long description, the field where you enter your bot description

#

you can use html inside that, lemme make you a quick example

earnest phoenix
#

someone helppp it didnt work

#

who are you talking to?

#

me or rai

#

anyone

rustic nova
#

@earnest phoenix using this inside your long description changes for example your whole bot page to green:

#bot-details-page {
    padding-top: 120px;
    background: green;
}
earnest phoenix
rustic nova
#

is that your bot?

earnest phoenix
#

yeah

rustic nova
#

you did it then, or what else do you want to change?

earnest phoenix
#

buttons

#

me i want chnage color button

#

(Invite ,Vote)

#

i wanna change all buttons so they look cool

lapis bramble
#

all changes color

#

css

earnest phoenix
lapis bramble
rustic nova
#

Changing the buttons is easy aswell, their css name is .btn-orange
an example would be this

.btn-orange {
    background: green;
}

this would change your buttons to green

earnest phoenix
#

😂

#

doesnt wotrk

#

work*

rustic nova
#

you can put that inside your already there style

earnest phoenix
#

work for me

#

...

#

immm tooo dumbbbb

rustic nova
#

so just add it below the current òne

#

Wait

lapis bramble
#

lol wat

earnest phoenix
#

thank you

quartz kindle
#

@earnest phoenix css has to be inside <style> tags

#

otherwise it wont work

earnest phoenix
#

;-;

rustic nova
#

put it below your background change

earnest phoenix
#

one sec

rustic nova
#

also, you dont need 2 <style></style>, one is good enough

lapis bramble
#

<html> <style> <body>

earnest phoenix
#

i am so dumb i am laughing

quartz kindle
#

remove html and body

#

and head

#

you dont need those

lapis bramble
#

same true

earnest phoenix
rustic nova
#

both

#

put the #bot-details page inside your <style> </style>

quartz kindle
#

including the <>

#

lol

earnest phoenix
#

for floating image :

<style> 
  .bot-img{ 
  animation: float 2s ease-in-out infinite;
  } 
  @keyframes float { 
  0% { 
  box-shadow: 0 10px 25px 0px rgba(0,0,0,0.6); 
  transform: translatey(0px);
  } 50% { 
  box-shadow: 0 25px 15px 0px rgba(0,0,0,0.2); 
  transform: translatey(-20px); 
  } 100% { 
  box-shadow: 0 25px 55px 0px rgba(0,0,0,0.6); 
  transform: translatey(0px); 
  } 
  } 
</style>```
#

dont have that

quartz kindle
earnest phoenix
#

so i delete that style

#

or keep

#

C:\Users\poronga\3D Objects\Otisbotfinal\commands\skip.js:12
serverQueue.connection.dispatcher.end("La cancion fue skipeada");
^

TypeError: Cannot read property 'end' of null

#

😐

#

thank you so much @rustic nova

rustic nova
earnest phoenix
rustic nova
#

you already have one that says bot info, you can remove that

#

i'll be with you in a few minutes

earnest phoenix
#

oki

lapis bramble
#
<style>
.votebutton {
background-color: white;
color: white;
}
</style>```
earnest phoenix
#

and how i can make a walpaper on background ?

lapis bramble
#

background-image:

earnest phoenix
#

and image link ?

lapis bramble
#

{
background-image: "link"
}

#

yeah

earnest phoenix
#

okk

#

thank you

rustic nova
#

alright @earnest phoenix, you don't need multiple style tags with the same thing

earnest phoenix
#

oh

rustic nova
#

oh, good job Clap2

earnest phoenix
#

i keep getting meet women in your area when i am gay ...

rustic nova
#

yeah that's just ads

earnest phoenix
#

imma change my packground to plack

#

black*

#

who knows how to reduce the outline of an image (no relation to the development)

fallen dome
#

why is the preview button not doing anything?

#

its not previewing

earnest phoenix
#

how do i make the buttons have a shadow of that color that i have

fallen dome
#
#example1 {
  box-shadow: 5px 10px;
}

#example2 {
  box-shadow: 5px 10px #888888;
}```
lapis bramble
#

width="" height="" @earnest phoenix

fallen dome
#

also, can i not use bootstrap?

#

i can right

rustic nova
#

bootstrap is something with js, right?

fallen dome
#

no

rustic nova
#

you should then

fallen dome
#

its a css library

earnest phoenix
#

why put example

rustic nova
#

yeah you should be able to then

fallen dome
#

ok

#

are u guys able to prview ur shit

earnest phoenix
#

XD

fallen dome
#

#example is the id

#

change it to a class if u want

#

and add the class to ur button

#

like this

#
.example1 {
  box-shadow: 5px 10px;
}


...


<button class="example1">Click me</button>
#

but the .example1{} must go in ur css

#

not html

#

also WHY CANT I preview

#

u could add inline styling

earnest phoenix
#

niceee....

fallen dome
#

yea now change the styles

earnest phoenix
#

how

fallen dome
#

i mean isnt the shadown too intense

#

u can change the numbers

#

and im pre sure u can change the color bu just adding it after the 10px

#

anywayssssssss.

#

preview...

#

is it working for u?

earnest phoenix
#

yesh thanks

#

i trying this

#

but it did not work

spark oracle
#

@earnest phoenix

#

Check your dm

earnest phoenix
#

some one left a 3 star review bc the audio shutters and it only shutters when RTC is down

spark oracle
#

Yo

#

how do i change the background color?

fallen dome
#

yo im so confused

spark oracle
#

Me too

fallen dome
#

ive been trying to figure out preview for like half an hour

#

why cant i preview myHTML

spark oracle
#

i didn't even know we can change

#

the backgroun

earnest phoenix
#
.votebutton {
  box-shadow: 2px 2px;
}
</style>
<style>
.votebutton {
background-color: white;
color: white;
}
</style>
<style> 
  .bot-img{ 
  animation: float 2s ease-in-out infinite;
  } 
  @keyframes float { 
  0% { 
  box-shadow: 0 10px 25px 0px rgba(0,0,0,0.6); 
  transform: translatey(0px);
  } 50% { 
  box-shadow: 0 25px 15px 0px rgba(0,0,0,0.2); 
  transform: translatey(-20px); 
  } 100% { 
  box-shadow: 0 25px 55px 0px rgba(0,0,0,0.6); 
  transform: translatey(0px); 
  } 
  } 
</style>
<style>
.btn-orange {
    background: #8A6DB0;
}
</style>
<style> #bot-details-page {
    padding-top: 120px;
    background: #2A292B;
}
<style>
="background-color:#8A6DB0;"
  </style>```
#

thats all i have

#

pls

#

webpack experts

honest perch
#

Webpack

#

More like leak the source pack

earnest phoenix
#

there's not even that much code and only 5 packages

#

actually

#

i think it's an icon library

#

aaaaaand i was right

spark oracle
#

I don't understand anymore my bot has 38 votes and only 56 servers and it's been a week that he is so......... How can i grow him up

zenith knoll
earnest phoenix
#

implement interesting features 🤷

#

it isn't @zenith knoll

zenith knoll
#

how to get the id then

#

cause it works for Kicking

earnest phoenix
#

take a guess

zenith knoll
#

no

#

guild id

earnest phoenix
#

yes

zenith knoll
#

not member

earnest phoenix
#

i'm aware

zenith knoll
#

oh ok

#

uh

earnest phoenix
#

it's a property, not a method

#

remove ()

zenith knoll
#

i dont have it

earnest phoenix
#

how do i change color of text on my bots page now

zenith knoll
#

is code where error is

rustic nova
#

I don't understand anymore my bot has 38 votes and only 56 servers and it's been a week that he is so......... How can i grow him up
@spark oracle not development related, but a bot needs time and effort to grow. Implement features that might sound interesting to potential bot users, invent something new that nobody has seen before.

earnest phoenix
#

that should work @zenith knoll

zenith knoll
#

it says

earnest phoenix
#

...

#

which d.js ver are you using

zenith knoll
#
id: 4)
(node:12) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'id' of undefined
at Client.<anonymous> (/home/container/index.js:226:31)
at Client.emit (events.js:314:20)
at Object.module.exports [as GUILD_BAN_ADD] (/home/container/node_modules/discord.js/src/client/websocket/handlers/GUILD_BAN_ADD.js:15:29)
at WebSocketManager.handlePacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketManager.js:384:31)
at WebSocketShard.onPacket (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:444:22)
at WebSocketShard.onMessage (/home/container/node_modules/discord.js/src/client/websocket/WebSocketShard.js:301:10)
at WebSocket.onMessage (/home/container/node_modules/ws/lib/event-target.js:125:16)
at WebSocket.emit (events.js:314:20)
at Receiver.receiverOnMessage (/home/container/node_modules/ws/lib/websocket.js:797:20)
at Receiver.emit (events.js:314:20)
(node:12) 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: 5)```
#

djs v12

earnest phoenix
#

i

zenith knoll
#

lemme check exact version

#

^12.4.1

rustic nova
#

@zenith knoll code SmileW

#

where the error occurs

earnest phoenix
#

no heeleoepepe

#

the error does not say that it isn't a function

zenith knoll
#

i just send

earnest phoenix
#

how do i change text color on my page\

#

it's saying that whatever you're trying to call id on is undefined, aka the guild is undefined

rustic nova
#

Full code if possible

zenith knoll
#

kk

earnest phoenix
#

....

zenith knoll
#

free code lmfao hereclient.on("guildBanAdd", async (member) => { if (member.id == client.user.id) return; if (!servers[member.guild.id] || !servers[member.guild.id].logs) return; const channel = member.guild.channels.cache.get(servers[member.guild.id].logs); const audit = await member.guild.fetchAuditLogs({ limit: 1, type: 'MEMBER_BAN' }) const banLog = audit.entries.first(); if (!banLog) { const e = new Discord.MessageEmbed() .setColor('RED') .setTitle(`Member Banned`) .setDescription(`👮 ${member} was banned from the server, but we couldn't locate who did it.`) .setFooter(`User ID: ${member.id} - OXYGEN Security`, client.user.avatarURL({ dynamic: true, format: 'png', size: 1024 })) return channel.send(e) } const { executor, target } = kickLog; if (target.id === member.id) { const e = new Discord.MessageEmbed() .setColor('RED') .setTitle(`Member Banned`) .setDescription(`👮 ${target} was banned from the server by ${executor}`) .setFooter(`User ID: ${member.id} - OXYGEN Security`, client.user.avatarURL({ dynamic: true, format: 'png', size: 1024 })) channel.send(e) } else { const e = new Discord.MessageEmbed() .setColor('RED') .setTitle(`Member Banned`) .setDescription(`👮 ${member} was banned from the server, but we couldn't locate who did it.`) .setFooter(`User ID: ${member.id} - OXYGEN Security`, client.user.avatarURL({ dynamic: true, format: 'png', size: 1024 })) return channel.send(e) } })

earnest phoenix
#

WTFFF

#

I KEEP GETTING 18+ ADS

zenith knoll
#

is this dev related

earnest phoenix
#

i know.

#

then use an adblock

#

im not dumb

#

ive been trying to talk to H

#

REEE

zenith knoll
#

help please

earnest phoenix
#

i dont have adblock

#

dbl doesn't have control over ads they show you, they use google ads

#

help please
@zenith knoll i wish i could bud but i cant

#

google ads show you relevant ads to what you've been searching for

#

you're getting 18+ ads because you searched for titties

#

use incognito next time

#

Clear your data

#

I AM GAY

#

WTF

rustic nova
#

you searched for titties
lmao

earnest phoenix
#

AND ON SCHOOL LAPTOP

#

I AM OFFENDED

#

ive been clearing data.

#

somebody else on your network's been searching for titties then 🤷

#

if you looked at my history you would find gay P**n

#

my dad >.>

#

he always does

#

he watches hentai and hes 50

#

LIKE BRUH

#

quite possible lol, my mom influenced my ad interests

#

google ads is so stupid

#

ikr

rustic nova
#

that's why i opt-out from personal ads on google smug

earnest phoenix
#

my ad settings are off

#

how am i getting this!

rustic nova
#

^turning them off doesn't work

earnest phoenix
#

just install ublock origin and use firefox

#

good combo for blocking ads and trackers

zenith knoll
#

@rustic nova sorry for ping but uh any ideas

earnest phoenix
#

no help for u

#

Channel for chatting about (bot) development. If you have questions, ask the questions and wait for someone who can answer to help you. Do not ask to ask. Provide all possible information so people know what's up. Just saying "I get an error" doesn't give us enough information on your problem. Do not @mention people randomly.

rustic nova
#

yeah i don't see any problems from my js knowledge

zenith knoll
#

ok then im going to check docs again, idk why it aint working

earnest phoenix
#

how do i change my bots page text color

vague imp
#

You can turn off Google tracker in your Google account settings

zenith knoll
#

i am so dumb

rustic nova
#

You can turn off Google tracker in your Google account settings
yup, did that and opted-out of personal ads

zenith knoll
#

the ban event passes in guild obj if u require it

rustic nova
#

Told you

#

fuck intents

zenith knoll
#

LMFAO

rustic nova
earnest phoenix
#

hello? i asked how i change text color

zenith knoll
#

my 6 bots all stopped after intents

vague imp
#

What happened with intents?

earnest phoenix
#

clearly i am very important

rustic nova
#

my 6 bots all stopped after intents
@zenith knoll IKR, I HAD TO LIKE FIGHT WITH MY CODE FOR LIKE 10 HOURS

earnest phoenix
#

XD

rustic nova
#

till i went to the javacord support and asked why it wasn't working

#

then told me "do you use itents?"

zenith knoll
#

lmfao

#

my bot just didnt respond

#

i got like dms from 7 ppl saying "uyr fkin dumb bot aint no work"

rustic nova
#

Some libraries should just inform you if you use a specific event that requires intents

vague imp
#

If you are using any event that requires privledge gateway then you will need to turn it on from dev portal

zenith knoll
#

whats dumb is for game changing updates

#

djs doesnt ping that

#

djs discord server

vague imp
#

Always refer to discord api official documentation

#

Nobody will ping you it's your job as a developer to be updated

rustic nova
#

If you are using any event that requires privledge gateway then you will need to turn it on from dev portal
@vague imp How do you know to do that when you don't trust yourself and your coding skills and your bot doesn't tell you that you didn't enable privileged gateways mmLol

vague imp
#

If you event is not working it's obvious

earnest phoenix
#

how do i chnage textdyp color

vague imp
earnest phoenix
#

I KNOW I AM DUMB BUT CMON

rustic nova
#

I know myself, i don't trust myself

vague imp
#

Also it was informed earlier that they will enforce gateway

#

It was decided on 7th

earnest phoenix
#

imma go

vague imp
#

But they did it later

#

So people had enough time

rustic nova
#

@earnest phoenix

p {
    font-weight: 400;
}
``` add color inside it
#

Inspect element can help too

#

So people had enough time
@vague imp Yeah my Library discord announced that too, but i don't really notice it due to having disabled message sounds and them not pinging everyone

earnest phoenix
#

Anybody know how to work vote tracking system

sudden geyser
#
  1. use top.gg webhooks api
  2. when a vote is received, store it in a database
  3. profit
earnest phoenix
#

Hey i tried to make a mute command but it throws an error when i try to put a tempmute

#

(node:10312) UnhandledPromiseRejectionWarning: ReferenceError: ms is not defined

sudden geyser
split hazel
#

fixed it with outline none

#

on focus*

delicate shore
#

Yo i can't setup my bot

proven cliff
#

?

delicate shore
proven cliff
#

A bit more explanation would be nice

delicate shore
#

on my vps

#

I keep getting this error

proven cliff
#

Are you using python?

delicate shore
#

no

proven cliff
#

js?

delicate shore
#

yes

proven cliff
#

I’m not gonna lie and pretend I know how to work with js, but gl ig

delicate shore
#

okk

proven cliff
#

Someone will prob come and help you soon

delicate shore
#

thanks

proven cliff
#

so just keep an eye on here

#

hope it gets fixed :D

delicate shore
#

:)

weary ridge
#

fixed it with outline none
@split hazel Thanks you helped me to LOL

split hazel
#

why I always leave my solutions uwuSnuggle

sudden geyser
#

Since it doesn't look like the command could be found, you could try installing it.

lucid prawn
#

:0

delicate shore
#

Now I get an error could not locate binding

sudden geyser
#

could you screenshot what it looks like

delicate shore
#

Yes sure

#

Here ^

#

I reinstalled better sqlite 5 times

umbral zealot
#

try npm rebuild

delicate shore
#

I did that 6 times

umbral zealot
#

if that doesn't work, run npm i -g node-gyp and try again

delicate shore
#

I did that also

#

These all were on stack over flow

#

I did all of these

#

But nothing worked

umbral zealot
#

Ok, well, at htis point, the binding error, try rm -rf ./node_modules and then npm install

delicate shore
#

I did even that

umbral zealot
#

if that doesn't work, try with yarn

#

Ok but the problem changed now so do it again

#

it used to be another problem, this problem might be resolved by retracing other steps

delicate shore
#

Problem previous one solved because I was using other version of node

#

But in package file it was 12x

#

So I down graded

umbral zealot
#

Can you try deleting node_modules and running npm install, right now?

delicate shore
#

Yes I am doing it will take time

umbral zealot
#

yes, I'm aware

#

like I said, yarn sometimes can work better.

#

it's also usually faster.

delicate shore
#

So one thing

#

Should I do npm install

#

Or should I install yarn

#

Then do yarn install

umbral zealot
#

I'd try with yarn

#

historically for me it's been more solid and constistent

delicate shore
#

Alr

#

My bot been down from 12 hrs

vale garden
#

hello

#

feels good to finally have the bot developer role

#

yayayay

#

lol

#

my bot got rejected 6 times now cuz it was offline all the time

earnest phoenix
#

i-

vale garden
#

lol

umbral zealot
#

I mean all you had to do was make sure the bot stayed online. not that hard.

delicate shore
#

@umbral zealot did it

#

Same error

umbral zealot
#

or look through the existing one. see if one fits.

delicate shore
#

He says it's not issue with package

#

And only says that remove modules folder

#

And install again

umbral zealot
#

¯_(ツ)_/¯

vale garden
#

I mean all you had to do was make sure the bot stayed online. not that hard.
@umbral zealot thing is it didnt have 24/7 hosting cuz i didnt know how to do it at the time and the bot was always checked at times like 3 am for me

#

so not that hard

#

isnt true

#

by a bit

#

lol

umbral zealot
#

I've had test bots on one testing server stay up 24/7 on free hosting services so I dunno what you're talking about 😂

#

It's easy, if you know what you're doing. You didn't, that's lack of knowledge, not difficulty of the task.

earnest phoenix
#

how to get dbl api

stable nimbus
#

Anybody use MySQL that could help me?

umbral zealot
stable nimbus
#

I am having an issue figuring out how to implement my database with a new set of files and coding style, and I need help cause I have no idea how and I’ve tried googling and asking on stack overflow and stack overflow removed my post.

#

Sorry... just a bit of pride here.

umbral zealot
#

More information required

#

What specifically do you need help with?

stable nimbus
#

Getting it functioning really, I used an open source bot as my tutorial so that way I can get my bot a lot more advanced and so I can learn a new coding style, I used the AtlantaBot for this. They used a mongoose DB and not MySQL, I’ve tried asking around in the support server and I haven’t received any sort of help.

#

I also think I may have found the answer to my problems so give me a second

umbral zealot
#

why would you choose mysql over mongodb?

#

mysql is shit

stable nimbus
#

Cause it’s what I learned.

umbral zealot
#

TL;DR: MySQL is a bad database. Don't use it unless you have literally no other option.

Why shouldn't I use MySQL?

  • MySQL has no transactional DDL. This means that if you fuck up creating a table in the middle of a migration, you cannot rollback easily.
  • MySQL has a lot of security issues. New zero-day vulnerabilities are found regularly.
  • MySQL is owned by Oracle.
  • MySQL is slow. It beats Postgres etc at some things, but once you move beyond basic queries it begins to slog.
  • MySQL disconnects you randomly. Unless you setup your connection specially, it will break regularly.
  • MySQL allows all kinds of insane data to be inserted. '0000-00-00' is valid in MySQL.
  • MySQL is not ANSI compliant. You have to turn it on; even then it isn't fully compliant.
  • MySQL has no feature advantage over other databases; PostgreSQL has many more useful features (such as RETURNs).

There is no reason to use MySQL over PostgreSQL, or even sqlite3. See also:
https://blog.ionelmc.ro/2014/12/28/terrible-choices-mysql/
https://grimoire.ca/mysql/choose-something-else

stable nimbus
#

Oh.

#

Welp. Guess it’s time to learn mongo.

umbral zealot
#

If you know mysql, PostgreSQL would be a better option

#

since it's using the same base language (SQL) you won't be lost with it

stable nimbus
#

Okay, is it still more the same stuff with SQL? Just... more secure I guess?

umbral zealot
#

better, faster, stronger.

stable nimbus
#

Okay, is that what you use?

pale vessel
#

nah, enmap /s

stable nimbus
#

And right when I start doing things I get it to work ffs...

main trench
#

hey so im making a embed command and it works fine with no errors except i was wondering how to split the args basically so let Title = args.slice(0).join(" ") this is the code i have for the title part but i was wondering how to split it from args[1] so this doesnt happen

trim saddle
#

@main trench split the string per space

main trench
#

May i see a example I'm still learning arg splitting

trim saddle
#
let greeting = "hello! how are you doing today?"
console.log(greeting.split(" ")) // ["hello!", "how", "are", "you", "doing", "today?"]
main trench
#

Ah I see what ya mean

delicate shore
#

OK so

#
const data = await prefix.findOne({
    GuildID: msg.guild.id
})
const PREFIX = null
if(data.prefix){
  PREFIX = data.prefix
}else{
  PREFIX = DPREFIX
}
#

const prefix = require('./models/prefix');

main trench
#

So just ```let title = args[0]

.setTitle(title.split(" ")```

#

@trim saddle would this work?

pale vessel
#

args[0] would be the first word?

delicate shore
#
const data = await prefix.findOne({
    GuildID: msg.guild.id
})
const PREFIX = null
if(data.prefix){
  PREFIX = data.prefix
}else{
  PREFIX = DPREFIX
}

@delicate shore Ig gives an error

main trench
#

Yeah

pale vessel
#

why are you splitting it again

#

it has already been split

main trench
#

Its a embed command

delicate shore
main trench
#

So args[0] is title and args[1] is description

pale vessel
#

yes and don't split it

#

it's already an array

trim saddle
#

@pale vessel i'll split you for crapping on my answer

main trench
#

But how it is now args[0] is including args[1] which ruins the embed

pale vessel
#

do it, no balls

main trench
#

Causing this

pale vessel
#

how did you split your args

main trench
#

args.slice(0).join(" ") for title and description

#

Description is slice(1) though

pale vessel
#

you can use args.shift()js let greeting = "hello! how are you doing today?".split(" "); console.log(greeting.shift()); // "hello!" console.log(greeting.join(" ")); // how are you doing today?

#

you don't need to use slice

main trench
#

So just ```let title = args[0].split(" ")

.setTitle(title.shift())```

pale vessel
#

nono

main trench
#

Hmm

pale vessel
#

args[0] is the first word

main trench
#

Oh true

pale vessel
#

you don't need to split it

#

it will turn it to an array

#

just use args

main trench
#

Ah

#

And that will only contain the Title part?

pale vessel
#

it should already be an array so you don't need split() either

#

nah

#

you need to use args.shift()

#

and then the description would be args.join(" ")

main trench
#

Aight ill try it and see the outcome

pale vessel
#

so it takes the first word and use it for title. now that the array doesn't have the first word (since you used shift()), you can join it back

main trench
#

Aight

#

New problem i can't have multiple words in the title

pale vessel
#

yep

main trench
#

But the reason I did .split was to have multiple words in title

#

Any way to make this work how im intending it to?

lusty quest
#

@delicate shore did you use GUILDID as unique key?

delicate shore
#

Yes

#

Why ?

lusty quest
#

just a step to make sure why your prefix is undefined

#

ahh found your issue

#
const PREFIX = null //Const makes your Value Static use Let instead
if(data.prefix){
  PREFIX = data.prefix //you try to overwrite a static value
}else{
  PREFIX = DPREFIX //you try to overwrite a static value
}
delicate shore
#

Lol

#

yea i had fixed that

#

But the issue was

#

in prerfix .js i had Prefix

#

but here i had prefix

#

if that makes sense

lusty quest
#

yea this also breaks it atleast if you try to reference it somewhere else

delicate shore
#

btw @lusty quest how to delete it

#

how to delete the schema

#

of a guild

#

can u guide me?

lusty quest
delicate shore
#

alr thanks

#

Not working

lusty quest
#

the one here is probably softlocked bcs there is no prefix

delicate shore
#

Means?

lusty quest
#

you could log into your database with MongoDB Compass and set manually a prefix for here

delicate shore
#

I have not connected a mongo db using url

lusty quest
#

think2 how did you then want to get the prefix from the database?

delicate shore
#

dk myself

#

but it's working

lusty quest
#

await Guild.findOneAndRemove({guildID: guild}) is the correct function.

delicate shore
#

oh wait

#

I have connected

#

Alr

#

thaks

#

Btw

#

How to save an array in mongose

lusty quest
#
in your model; options: Array, 
#

then just pass the array into your model or save constructor

silk lotus
#

hello, can anyone help me?

lusty quest
#

if you want to define a model and save an object that is also possible users: [{Name:String, 2ndName:String}],

#

@silk lotus sure

silk lotus
#

ok wait

zinc hawk
#

@slow canyon is showing offline in my server

lusty quest
#

this here is the wrong server for this @zinc hawk

#

visit the Support server from the Bot

silk lotus
#

im making a member count feature which gets a voice channel and put the total no. of members in the guild, see my code too

module.exports = (client, message) => {
    const channelName = message.guild.channels.cache.name.startsWith('Members:')
    if(!channelName){
        return
    } else {
            const updateMembers = (guild) => {
            const channel = guild.channels.cache.get(channelName)
            if(channel){
                channel.setName(`Members: ${guild.memberCount.toLocaleString()}`)
            }
        }   

        client.on('guildMemberAdd', (member) => updateMembers(member.guild))
        client.on('guildMemberRemove', (member) => updateMembers(member.guild))

        const guild = client.guilds.cache.get('774930645888794625')
        updateMembers(guild)
    }
} ```
the error:
```js
TypeError: Cannot read property 'guild' of undefined
lusty quest
#

yea they wont work as good as they used to bcs you need now also intends

silk lotus
#

wdym 😅

lusty quest
#

const updateMembers = (guild) => { where did you define guild

silk lotus
#

ohh

lusty quest
delicate shore
#

if you want to define a model and save an object that is also possible users: [{Name:String, 2ndName:String}],
@lusty quest
I wanna do this like in user id it saves all links asked by user

lusty quest
#

?

delicate shore
#

for eg

#

User Id {
playlist_name : Name
playlist_songs : ['1','2']
}

#

like this

lusty quest
#

ok

#

then just push the new entry into your array

delicate shore
#

alr

#

btw

#

how can i edit data from mongo webisite

lusty quest
delicate shore
#

Alr thanks

#

how can i edit data from mongo webisite
in data lake?

vale garden
#

hi

lusty quest
#

i suggest use MongoDB compass. also idk with the website i have my own server running it without any website

#

hi

delicate shore
#

and what is dbname?

lusty quest
#

?

delicate shore
#

when I go to connect

#

mongodb+srv://bot:<password>@cluster0.shgav.mongodb.net/<dbname>?retryWrites=true&w=majority

#

Here what is dbname

#

where i can get that

lusty quest
#

you only need to add this if you want to access only one database. if you want to access the entire database dont set a name

delicate shore
#

i did set a name

#

But i did not sent name anywhere on mongo

lusty quest
#

if you use MongoDB atlas you can just copy/paste a connectionstring

#

the db name is the name of the Database you want to connect to

delicate shore
#

Yes i do

#

the db name is the name of the Database you want to connect to
@lusty quest means username?

#

in database access

lusty quest
#

username is for authentification

delicate shore
#

Oh

#

But how can i change or see dbname

#

is this the db name?

lusty quest
#

no this is the cluster

delicate shore
#

oh

#

I am confusion

lusty quest
#

i know

#

if you want to login with Compass dont set a dbname

#

then you can see every database you have in your MongoDB database

delicate shore
#

Ok but

#

I wanna connect to it

#

Using my bot

lusty quest
#

then set a name

delicate shore
#

mongo.connect one

#

Anything ? I can set any name ?

lusty quest
#

it doesnt matter what name it will create one

delicate shore
#

Ok thanks

hollow sedge
#

You should remake that cluster because the name shouldn't be Cluster0

#

And I don't think you can rename it

lusty quest
#

you rename the cluster but it wont really change anything

delicate shore
#

Yay

#

my website got approved

#

for adsense

#

@lusty quest I did this

if(command === "fixitpls"){
  await prefix.findOneAndRemove({guildID: "264445053596991498"})
  await prefix.findOneAndRemove({guildID: "690557545965813770"})
  msg.channel.send(`done`)
}
lusty quest
#

and?

lusty quest
#

well you deleted all configurations and never generated a new one lol

delicate shore
#

But i have done this

#
  const data = await prefix.findOne({
    GuildID: msg.guild.id
})
let PREFIX = null
if(!data){
  PREFIX = DPREFIX
}else{
  PREFIX = data.prefix
}```
#

So data is absent

lusty quest
#

where did you set DPrefix?

delicate shore
#

in env

#

DPREFIX = "s!"

#
      let newData = new prefixModel({
          prefix: args[1],
          GuildID: message.guild.id
      })
      newData.save()```
#

should i try this

lusty quest
#

will not work bcs you cant run a command

delicate shore
#
      let newData = new prefixModel({
          prefix: "aa",
          GuildID: "264445053596991498"
      })
      newData.save()```
#

This

lusty quest
#

this can work

delicate shore
#

lemme eval

neon heart
#

use async and promise

eternal solstice
#

any solutions

umbral zealot
#

Presumably the solution is to fix whatever syntax error in your code.

lusty quest
#

press the problems button down where the therminal is but i guess you have one excessive }

umbral zealot
#

In other news that is just about the most horrible theme I've ever seen on VSCode or any IDE in my entire life.

pale vessel
#

if else if else if else if else if else

vague imp
#

I like how he is defining embed again and again

#

New to programming I guess

umbral zealot
#

I'd suggest adding the "Bracket Pair Colorizer 2" extension in vscode it makes seeing matching brackets much easier @eternal solstice

#

because clearly you have one that's not matching

pale vessel
#

should be fine based on the scope

#

its not hoisted

vague imp
#

Define embed in global scope add fields and stuff in if else based on need

#

And send in last

#

Ideal way

lusty quest
#

the embeds are fine but the chained else if statements are almost on a Tsundere Dev level

umbral zealot
#

Now, obviously, they've asked this question before at <#development message> and they even had an error but now they decided "let's start over again from the top" 8 hours later, ignoring any progress made to help them

delicate shore
#

Feels so good watching ads on your own website

lusty quest
#

they are way to easy to get rid off

delicate shore
#

And btw @lusty quest thanks

#

I downloaded compass

#

and removed from there

#

it worked then

vague imp
#

He might don't know if else and else if

stable nimbus
#

Hey @umbral zealot, any idea why db.query() is not a function?

umbral zealot
#

lol_quick_db.gif

restive furnace
#

dEfInE it

umbral zealot
stable nimbus
#

It is defined lmao.

restive furnace
#

doesnt seem so

umbral zealot
#

It's just not a function.

eternal solstice
#

@lusty quest i know i do but i'm trying to add a new else

umbral zealot
#

¯_(ツ)_/¯

vague imp
#

@eternal solstice please learn basic please

lusty quest
#

@eternal solstice you have an excessive } if you check the Problems tab it will tell you

umbral zealot
#

@eternal solstice look at what I gave you. Use the bracket pair colorizer and your cursor selections to determine where you're missing a } or { or whatever

stable nimbus
#

Quite literally is defined, no idea why it just... isn't a function

lusty quest
#

but i suggest use a Switch case instead of the Else if chaining

vague imp
#

He is adding else after else

eternal solstice
#

no

#

thats not what im trying to do

vague imp
#

Then

delicate shore
#

What tha actual heck?

stable nimbus
#

...

delicate shore
#

Quck.db doesn't install in one folder

#

but installs in other

#

what the

umbral zealot
#

@stable nimbus except it's not. db.query isn't a thing in quick.db.

vague imp
#

@eternal solstice

eternal solstice
#

ok

pale vessel
#

i thought they were asking whether they should pick postgresql or mongodb, why did they choose quick.db WaitWhat

vague imp
#

Lol

eternal solstice
#

done

stable nimbus
#

I don't use quickdb...

pale vessel
#

ah

#

what

umbral zealot
#

@stable nimbus well then maybe you should actually tell us wtf you're using, honey.

pale vessel
#

so pgsql?

umbral zealot
#

What's db

lusty quest
#

not everyone is comfortable with a remote database or dont have money for it. sure there are Free Hosts like Firebase or MongoDB Atlas but they usually need a credit card for authentification

stable nimbus
#

I AM STILL USING SQL BECAUSE I'M A LIL BITCH AND DON'T WANNA CHANGE DB'S

pale vessel
#

which sql

umbral zealot
#

SQL is a language.

vague imp
#

Using a good db like mongo or MySQL is better someday u will want to make a dashboard then u have to transfer all stuff

pale vessel
#

what sql

umbral zealot
#

not a module

stable nimbus
#

MySQL

pale vessel
#

uh oh

#

stinky

umbral zealot
#

MySQL is a server. Not a nodejs module.

pale vessel
#

what module 🗿

vague imp
#

Yes

umbral zealot
#

What, specific thing are you using. How do you define db?

pale vessel
#

mysql? mysql2?

vague imp
#

mysql is a module too

stable nimbus
#

mysql

vague imp
#

There is a module named mysql

pale vessel
#

show your code

#

how did you define db?

umbral zealot
#

yes. show exactly how you're defining these things.

eternal solstice
#

@vague imp what seems to be the problem

restive furnace
#

btw why mysql really?

vague imp
#

@eternal solstice send link dude

eternal solstice
#

i cant here

#

do i dm u

umbral zealot
#

Why could you not send the link?

#

it's not like we haven't seen this exact code before

vague imp
#

Send it here

eternal solstice
lusty quest
#

you should be allowed to post here links from hastebin as example

eternal solstice
#

i thought i had no perms

lusty quest
#

you cant chain 2 else in a row

#

use else if or a switch case

pale vessel
#

why not just members.first()

vague imp
#

@eternal solstice learn if else properly

stable nimbus
#
async run(client, message, botdb){
        await botdb.query(`SELECT * FROM users WHERE userid = ${message.author.id}`, async (err, results) => {
            if(err) throw err;
            await message.delete().catch(() => {});
            const Embed = new MessageEmbed()
            .setAuthor(message.member.displayName, message.author.displayAvatarURL())
            .setTitle(`${emoji.civ} Your Inventory! ${emoji.civ}`)
            .setColor(0xA1EE33)
            .setDescription(`Hello <@${message.author.id}>! Here is your inventory!\n ====== \n${results[0].inventory}`)
            .setTimestamp(message.createdAt)
            .setFooter(config.copyright);
            await message.channel.send(`Hey <@${message.author.id}>!`, Embed);
        });
    };
};

The Command ^^

const botdb = mysql.createConnection({
    host: 'localhost',
    password: '',
    database: 'bot',
    user: 'root',
});

botdb.connect(err => {
    if(err) throw err;
    console.log('Connected to the bot\'s database!');
    botdb.query('SHOW TABLES', console.log);
});

botdb.queryPromise = function(sql) {
    return new Promise(function(resolve, reject) {
        botdb.query(sql, function(err, results, fields) {
            if(err) reject(err);
            resolve(results, fields);
        });
    });
};```
How I defined it with a bit of help of the queryPromise.
vague imp
#

You can't add else after else

pale vessel
#

oh god

eternal solstice
#

then how can i add another case

pale vessel
#

use mysql2/promise

vague imp
#

Also for tag it's member.tag

pale vessel
#

dont wrap those

#

they made a promise based module

pastel kiln
#

hi

vague imp
#

Learn basic please no one will spoonfeed u here

pastel kiln
#

what is this server for ?

pale vessel
umbral zealot
#

await on a callback function. that's cute.

vague imp
#

@pastel kiln dbl and dsl

umbral zealot
#

@stable nimbus now tell us exactly what error you're getting and which line it refers to

#

because it's not db.query() is not a function clearly because you don't have a variable called db