#development

1 messages · Page 1134 of 1

golden condor
#

smh

earnest phoenix
#

incels gon be incels

feral aspen
#
                if(bioStatus > 3) return message.channel.send("To much words")```
golden condor
#

First of all Engrish. Second of all that's not how it works

feral aspen
#

I have the bot takes the args, but I want it that if the args has more than 3 words, it will return

#

any help

pure lion
#

Does VS have a compiler?

golden condor
#

It's not a number

earnest phoenix
#

VS is an IDE

golden condor
#

That code hurts md

feral aspen
#

help please.

#

can you reply.

earnest phoenix
#

reply

#

done

feral aspen
#

huh

earnest phoenix
#

that'll be 50 dollars

feral aspen
golden condor
#
let bioStatus = args.slice(2);
                if(bioStatus.length > 3) return message.channel.send("To much words")
earnest phoenix
feral aspen
#

Thank you @golden condor

golden condor
#

You needed to check the lebgth of the array

feral aspen
#

@earnest phoenix your not funny, to let you know.

pure lion
#

@earnest phoenix install py and windows build tools

#

@feral aspen cry veri funi

earnest phoenix
#

npm install --global --production --vs2015 --add-python-to-path windows-build-tools
npm install --global --production --add-python-to-path windows-build-tools node-gyp

#

I've tried these commands

golden condor
#

I didn't explain how to join them tho lmao

feral aspen
#

YeAh vErY fUnNy

earnest phoenix
#

not to brag but yeah im funny im on the starboard 😎

golden condor
#

Same

earnest phoenix
#

plz help me

misty sigil
#

code

#

oh wait i just seen im dummy

golden condor
#

@earnest phoenix npm i -g windows-build-tools

quartz kindle
#

@earnest phoenix integer 1.0.7 is very old and outdated

#

you're trying to use an old version of something which is not supported anymore and not compatible with current node versions

#

most likely an old version of quick.db, enmap or sqlite

earnest phoenix
#

I'm trying to install quick.db

#

But I just couldn't make it

quartz kindle
#

what version are you installing? sounds like an old version

earnest phoenix
#

I don't know what version I have installed, I am just doing what I am told. I'm a little newbie

lusty quest
#

update your npm packages first maybe it helps

#

(npm update)

earnest phoenix
#

i-

#

you didn't update your project

#

you ran the cmd in sys32

#

lol

misty sigil
#

lmfao

earnest phoenix
#

lmao

#

uh sorry ;-;

quartz kindle
#

install npm packages on system32 to make your windows faster :^)

lusty spade
pure lion
#

Await queries

lusty spade
#

bruh 🤦

#

im so dumb

vivid plover
#

Gay xd

near ether
#

oh tim i stopped clearing reactions and re-applying them in my reaction menus like you said, and its been a great success so far!

#

i reduced the restTimeoutMs value by like 300ms and havent gotten ratelimited since

earnest phoenix
#

pffh

#

is there anyone who can helpis there anyone who can help

golden condor
#

It's null

earnest phoenix
#

code?

crystal socket
#

Not enough trace back

lusty spade
#

so i have this code, if the guild is in a blacklist no commands work but if guild is not blacklisted i want everything to work fine but i get this error
code: js await Blacklist.findOne({ guildID: message.guild.id, }, (blist) => { if(message.guild.id === blist.guildID) return; console.log(blist.guildID); });
error: TypeError: Cannot read property 'guildID' of null

earnest phoenix
#

TypeError: Cannot read property 'then' of null
at Client.<anonymous> (C:\Users\Muslum\Desktop\app\bot.js:390:39)
at Client.emit (events.js:327:22)
at MessageCreateHandler.handle (C:\Users\Muslum\Desktop\app\node_modules\discord.js\src\client\websocket\packets\handlers\MessageCreate.js:9:34)
at WebSocketPacketManager.handle (C:\Users\Muslum\Desktop\app\node_modules\discord.js\src\client\websocket\packets\WebSocketPacketManager.js:108:65)
at WebSocketConnection.onPacket (C:\Users\Muslum\Desktop\app\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:336:35)
at WebSocketConnection.onMessage (C:\Users\Muslum\Desktop\app\node_modules\discord.js\src\client\websocket\WebSocketConnection.js:299:17)
at WebSocket.onMessage (C:\Users\Muslum\Desktop\app\node_modules\discord.js\node_modules\ws\lib\event-target.js:120:16)
at WebSocket.emit (events.js:315:20)
at Receiver.receiverOnMessage (C:\Users\Muslum\Desktop\app\node_modules\discord.js\node_modules\ws\lib\websocket.js:789:20)
at Receiver.emit (events.js:315:20)

#

my bot is not starting

lusty quest
#

@lusty spade you never finish the Query and already want data from it

lusty spade
#

wdym?

earnest phoenix
#

@earnest phoenix send the code not the error stack

lusty quest
#

blist is not defined and you call a if function inside your mongoose query

#

do something like

earnest phoenix
#

all commands :/

pure lion
#

What he's trying to say is

lusty quest
#
const blist = await Blacklist.findOne({guildID: message.guild.id})

if(message.guild.id === blist.guildID) return;
pure lion
#

Mongoose slow, use async

earnest phoenix
#

send the code where the error is coming from

#

@earnest phoenix

lusty spade
#

ok

earnest phoenix
#

no specific code from where the error comes from

lusty quest
#

@pure lion no he was using a If statement inside the query -> doesnt work. also it was async

lusty spade
#

two findOne?

pure lion
#

Oh

lusty quest
#

two?

exotic prism
#

does anyone have a code for bee command?

pure lion
#

Oh the most recen-

earnest phoenix
#

no

pure lion
#

What???

lusty spade
#

look at the code u send

earnest phoenix
#

🥣

lusty quest
#

sry

#

fixed

earnest phoenix
#

send line 390 from bot.js plorany

lusty spade
#

and i get a new error (node:3468) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'guildID' of null

golden condor
#

You need to check if it exists or not

lusty quest
#

@lusty spade log blist before the if statement

exotic prism
#

ima make a code that lets my token escape the eval cmd

pure lion
#

If (no thingy) create new docc

lusty quest
#

also you probably want to add a way to have a fallback incase there is no Blacklist Document for the guild

pure lion
#

Or you can upsert if you're editing

golden condor
#

Yeah

lusty spade
#

doesnt log anything

#

on the unblacklisted guild

lusty quest
#

does a document exist?

#

also you dont need to compare the Blacklist id with the guild id since it only returns a document if the Guild is blacklisted

#

either add a Boolean value to check or just check if the query returns something or not

pure lion
#

Btw is the python syntax "if not foo" or "if foo not"?

lusty spade
#

ok

slender thistle
#

The latter

#

No...

#

The first one is correct

sand widget
#

i need help setting up bots :(

open nymph
#

i need help with my bot
SyntaxError: Unexpected end of input
 at wrapSafe (internal/modules/cjs/loader.js:1054:16)
 at Module._compile (internal/modules/cjs/loader.js:1102:27)
 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
 at Module.load (internal/modules/cjs/loader.js:986:32)
 at Function.Module._load (internal/modules/cjs/loader.js:879:14)
 at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
 at internal/main/run_main_module.js:17:47

pure lion
#

What is (square char)

open nymph
pure lion
#

You evaling?

pale vessel
#

no

ancient nymph
earnest phoenix
#

your console font can't display the character

#

use windows terminal

#

it's so much better than using raw cmd

#

WSL2 support, proper font rendering and tabs

viral iris
#

How to send message then embed?

open nymph
#

i dont know what to do :(

earnest phoenix
#

now that you fixed rendering issues

#

you more than likely have a syntax error in your code

wanton anvil
#

can we host unlimited bots if we upgrade to glitch pro???? PING ME ON ANSWER

earnest phoenix
#

i dont think you get how bots work

split hazel
#

glitch pro lets you boost 5 projects

#

and its like $10 monthly, not worth it

wanton anvil
#

ok

#

thanks @split hazel

#

where can I host unlimited bots

split hazel
#

i mean there is no such thing as unlimited, you have to get a host and pay for how many resources you'll need

wanton anvil
#

for example??

#

@split hazel

split hazel
#

you get access to an ssh where you can setup your bot hosting space

wanton anvil
#

how many bots can we run??

misty sigil
#

depends

wanton anvil
#

what is ssh?

misty sigil
#

secure shell

wanton anvil
#

oh

#

how many bots can we host on heroku

misty sigil
#

1

wanton anvil
#

really??

misty sigil
#

a very small one

wanton anvil
#

oh

split hazel
#

how many you can host all depends on the amount of servers, channels and members your bot has

misty sigil
#

^

#

and also depends on lib

#

how you manage caching

wanton anvil
#

can anyone explain me how can I send timed messages??

#

forever

#

any ideas ^ @misty sigil @split hazel

cinder patio
#

What programming language are you using?

wanton anvil
#

python

#

hello???

split hazel
#

well then what library?

wanton anvil
#

yes

open nymph
earnest phoenix
#

that's a syntax error

#

you never close setActivity

wanton anvil
#

he did I guess @earnest phoenix

misty sigil
#

they do? or am I just dumb

earnest phoenix
#

oh yeah they are

misty sigil
#

wait

#

they’re using bot

earnest phoenix
#

lol

misty sigil
#

client*

#

but they have it declared as bot

earnest phoenix
#

that code is a copypaste mess

misty sigil
#

is that not the issue

open nymph
#

changed it to client but still the same error

earnest phoenix
#

not the only thing

misty sigil
#

lmao

earnest phoenix
#

they're probably not closing the function in once

#

who are you copypasting from

misty sigil
#

no they aren’t

open nymph
#

i followed a tutorial

misty sigil
#

at least I think they aint

open nymph
#

i followed a tutorial from CodeLyon

honest perch
#

..

misty sigil
#

wut what’s codelyon

earnest phoenix
#

maybe i can help.you

#

@open nymph

#

what is causing error

worldly nymph
#

@open nymph In your code extra "," after "PLAYING"

earnest phoenix
#

no

#

don't help if you don't know how to or if you're inexperienced

#

you're doing the opposite of helping

misty sigil
#

yea there’s an extra ,

amber fractal
#

That doesnt actually matter in js

#

They just didnt close the function

earnest phoenix
#

they said it was after the activity type string anyways

#

lol

#

oh nvm

#

dumb

#

yeah what steven said

amber fractal
misty sigil
#

ah

amber fractal
#

They missing their }) for setActivity

earnest phoenix
#

no that's just what happens when you get a sixpack on your fingers from pressing ctrl c ctrl v too much mmLol

nimble kiln
#

You dont even need to define the type in that case
client.user.setActivity('with my code') will make the activity "Playing with my code"

pastel mural
#

pls add my bot xd

viral iris
#

How to add message then embed?

pastel mural
#

someone need music bot ? :b

misty sigil
#

How to add message then embed?
@viral iris just .send("message", embed)

viral iris
#

Thx

pastel mural
#

const embed = new RichEmbed()

#

:b

#

uh wait

naive shuttle
#

RichEmbed() still exists?

nimble kiln
#

const embed = new discord.MessageEmbed()
Discord.js v12

naive shuttle
#

I thought it was

const embed = new Discord.MessageEmbed()
#

Yeah

pastel mural
#

oh srry

wanton anvil
#

is there any discord.Bot attribute in dpy

pastel mural
#

const embed = new RichEmbed()
@pastel mural but i can use that?

sullen harness
#

That's because you're using v11 instead of v12.

pastel mural
#

oky thx

sullen harness
#

And if you're smart, you'd upgrade to v12.

earnest phoenix
#

Is there a way to edit a msg and remove the embed sent in it?

#

So for example const m = await msg.channel.send('text', embed); m.edit('text2');

#

hi

#

So for example const m = await msg.channel.send('text', embed); m.edit('text2');
@earnest phoenix Try iirc it'll work

#

it doesnt work

#

but i was wondering if it is even possible to do

celest marsh
#

Hello how I do to see on which servers
And how do I get it on the top.gg

earnest phoenix
misty sigil
#

no?!

earnest phoenix
#

You can edit the embed itself but I don't think that you can remove it, or you can use the Message#supressEmbeds

#

what

#

You need to send it to their api

#

you can remove the embed

#

set the embed to null and it should work

#

if it doesn't work, well, that's d.js' fault

#

I said Message#supressEmbed will work

#

But with null I don't know if it'll work

#

yes but the embed is still going to be there in the message

#

suppression only tells the client not to display ot

#

it*

#

Yes but there's a supressed property

#

you can remove the embed by editing the message and setting the embed to null, don't know if it works with djs

muted venture
#

Hey guys, Quick question, how can i verify my identity to discord? i'm uploaded and it said We are unable to verify your identity because the back of one or more of the documents you provided were missing. Please try again.
And now i want to verify again, the stripe page will say: Verification submitted

What should i do?

earnest phoenix
#

go ask in their developer guild

#

Stripe is the first check, discord does it own check

muted venture
#

stripe won't let me upload again

#

it automaticly direct me to the success page

earnest phoenix
#

discord. gg/discord-developers

#

ask in there

#

cant send the invite since im a whitename

misty sigil
#

got that covered for u mate

earnest phoenix
#

I can lol

#

How can i fix that?

#

It's working on eval but not working in a file.

wanton anvil
#

how many bots can we run at a time in non-pro glitch

earnest phoenix
#

ANYone?

misty sigil
#

@wanton anvil none

#

glitch isn’t good for bots

wanton anvil
#

just asking lol

#

say if anyone know

how many bots can we run at a time in non-pro glitch
@wanton anvil

honest perch
#

Technically

#

As many as you want

wanton anvil
#

oh ok thanks

misty sigil
#

don’t run bots on glitch

wanton anvil
#

at a time?? @honest perch

misty sigil
#

glitch is bad for bots

honest perch
#

don’t run bots on glitch
@misty sigil this

misty sigil
#

I cannot stress this enough

#

get a vps

earnest phoenix
#

Anyone???

wanton anvil
#

@honest perch can we run as many as we want at a time??

honest perch
#

Its not a function @earnest phoenix

#

It all depends but dont

misty sigil
#

no?

earnest phoenix
#

It's a function bro

#

D:

misty sigil
#

glitch doesn’t like bots

earnest phoenix
#

It's working in eval

#

why!?

quartz kindle
#

@wanton anvil depends on the resources

#

glitch offers very little resources, and a library like discord.js costs quite a lot of resources

wanton anvil
#

oh thanks

misty sigil
#

I wouldn’t use glitch tbh

wanton anvil
#

I use dpy

quartz kindle
#

also depends on the size of the bot, and what it does

#

dpy is quite costly as well

misty sigil
#

for anything rly

golden condor
#

Does glitch support py

honest perch
#

Yea

#

They actually support a lot

earnest phoenix
#

@quartz kindle can you help me 😖

honest perch
#

Swift ruby a bunch lmao

quartz kindle
#

glitch free gives you 512mb ram right? that should be enough for about 10 bots with 1 server each, or 1 bot with about 1000-2000 servers

amber fractal
#

well glitch blocked pinging services

golden condor
#

Yeah

amber fractal
#

so you cant really run them 24/7 anymore

golden condor
#

But they also allowed you to enable projects to stay up

honest perch
#

No

golden condor
#

You get 1000 hours a month now

honest perch
#

That's for premium

misty sigil
#

aye

golden condor
#

And you can keep some online

honest perch
#

But only static sites can stay up

amber fractal
#

So it's heroku now

misty sigil
#

still dinnae recommend it

golden condor
#

Yep

#

It's heroku now

wanton anvil
#

say can I use heroku??

golden condor
misty sigil
#

it’s better than glitch ig

golden condor
#

For py

wanton anvil
#

how many bots can I run in heroku

quartz kindle
#

same as glitch

wanton anvil
#

same as glitch??

golden condor
#

Yes basically

earnest phoenix
#

can someone help me?

#

i need help to make like an invite in embed

#

like ,ivnite

#

,invite

#

and then it shows up in embed form

golden condor
wanton anvil
#

@earnest phoenix are you using py??

earnest phoenix
#

you're misunderstanding how bots work, a bot is just an account and hosting one means just logging in with the account and keeping the connection alive

how many bots you can host on a single machine varies from library, to language, to the bot stats

#

no, lol, i just thought the pfp was cool.

#

manoj^^

#

i use discord.ks

#

js*

golden condor
#

Use MessageEmbed

earnest phoenix
#

i did but for inviting?

golden condor
#

What

earnest phoenix
#

like

#

like this.

#

@golden condor

#

those are markdown hyperlinks

#

google how to use them

golden condor
supple sail
#
${client.commands.map(c => `${ayarlar.prefix}${c.help.name}${' '.repeat(longest - c.help.name.length)} :: ${c.conf.aliases}`)``` Is there a way to limit maping? Ex: Just 10 commands.
earnest phoenix
#

Yes

amber fractal
#

theoretically

supple sail
#

And how please?

amber fractal
#

actually that's a collection isnt it

#

idk for that

summer torrent
#

slice(0, 10) ?

cinder patio
#

.first(10) ?

#

assuming you are using a Collection

amber fractal
#

oh yeah that exists lol

jolly wave
#

some of my commands are not working

#

every command with val

solemn latch
#

Val? Or var?

jolly wave
#

var

solemn latch
#

Use let

#

Not var

jolly wave
#

wait i mean let

#

xddd

solemn latch
#

Can you give an example of one of these commands?

jolly wave
#

wait

#
    let scount = client.guilds.cache.size
    message.channel.send('I am actually in ' + scount + ' servers.')```
#

here @solemn latch

solemn latch
#

Just making sure, you dont have a prefix on your bots commands?

jolly wave
#

wait

misty sigil
#

nope

#

No prefix

jolly wave
#

it was command

#

not message

#

bruhhhhhhhh

#

brb

misty sigil
#

lmao MarioFP

solemn latch
#

You should really change to switch cases if your doing it like this.

misty sigil
#

or a proper command handler

jolly wave
#

i like how my script is rn

misty sigil
#

for maximum unspaghettifying

solemn latch
#

Thats fine, just know small errors like this will be more common

jolly wave
#

wait let me test the command

solemn latch
#

With no error messages

misty sigil
#

Yup

jolly wave
#

it still don't work

#

wait

earnest phoenix
#

in discord.js embed objects how do i change the size which image :{} displays?

jolly wave
#

i forgot to save

#

💀

earnest phoenix
#

f

jolly wave
#

well it still don't work

earnest phoenix
#

aaa my chat is looking so messy

jolly wave
#

ah

earnest phoenix
#

also is there any way you can change the size images display in embed objects?

jolly wave
#

idk

#

took the embed from the guide

#

are you writing a whole paragraph

earnest phoenix
#

this is the embed:

let embed = {
  title: "e",
  description: "e"
  image: {
    url: "e",
    width: 1024,
    height: 1024
}
}

But the width and height properties don't do anything

#

i use MessageEmbeds rarely

jolly wave
#

Maybe bc the height need to be in ""?

#

Idk

earnest phoenix
#

Maybe bc the height need to be in ""?
wtf it is an integer

jolly wave
#

ah

#

btw you can unblock me

earnest phoenix
#

no

#

you got me muted

#

and i hate you anyways

jolly wave
#

bruh really

earnest phoenix
jolly wave
#

?

earnest phoenix
#

This is offtopic @jolly wave

#

is it even possible to change the width

#

or height
of images in embed objects

jolly wave
#

welp I can reblock you

earnest phoenix
#

Can you stop being a kid?

#

Grow up, and learn to follow the rules

jolly wave
#

just don't mind me if u want

earnest phoenix
#

Go to #general if you dont want to talk about development

#

yep

#

@earnest phoenix one of your bots in your github has 1.5k lines

jolly wave
#

smh not following rules is not being a kid

earnest phoenix
#

you cannot modify the size

jolly wave
#

Anyway I'm out

earnest phoenix
#

you cannot modify the size
f

#

you can't modify how anything is displayed to the end user

#

wtf

#

so

#

i need to change the size of the original image then?

#

sure but it wont matter that much

#

the client resizes the elements according to the windows width and height

#

and large images get scaled down

#

@earnest phoenix one of your bots in your github has 1.5k lines
@earnest phoenix it is my only bot

#

and it is now 2k lines

#

im gonna backup my code tomy github

quartz kindle
#

you can increase the size of the original image and it will be a bit bigger in this case

#

but there is a size limit above which discord will simply resize it

earnest phoenix
#

consider using waifu2x for that

#

upscaling normally, you would lose quality

#

i am using an API so i can't resize anyways 😭

#

download all of the images, resize them, upload them to discord

#

:wesmart:

solemn latch
#

^ i use discord as my cdn

solemn latch
#

every time my bot starts up, it grabs all the links to all those gifs

amber fractal
#

why dont you just save them?

#

Like in a config file

solemn latch
#

because i update them from time to time

#

the bot automatically will get the new set at the next startup

amber fractal
#

well you need to paste them in there right? Wouldn't that be the same as... pasting them into a config file?

solemn latch
#

discord is the cdn, id have to go back and get the link for each one

#

then save it to the config file

amber fractal
#

But you can't save them to the drive?

solemn latch
#

and upload them every time i use them?

#

right now i dont upload them every time

amber fractal
#

Do you use d.js?

solemn latch
#

yeah

amber fractal
#

do you just send the link or put it in an embed

solemn latch
#

i put the link in an embed

amber fractal
#

then it's downloading and uploading...

solemn latch
#

???

amber fractal
#

At least I've been told that's what it does

#

I may be wrong though

solemn latch
#

yeah, double checking

amber fractal
#

Wait, I have it backwards I think mmLol

#

Simple check would be to send the image and see if the url is the same mmLol

solemn latch
#

yeah, it doesnt download and reupload

#

i just did

amber fractal
#

I wonder what I'm thinking of then zoomeyes

solemn latch
#

if it did that, i actually would have been excited.
each file is rather large(roulette is actually my least efficient command file size wise, even with huge amounts of compression)
it would have meant my vps is faster than it should be

#

the internet on my vps*

amber fractal
#

Imagine that :P

#

I must've been thinking of local files being converted to streams or something

solemn latch
#

tim says the djs code is sometimes really wtf.

#

so i actually believed they might have done that

#

so, yes, i even checked the github.

#

lol

amber fractal
#

.setImage('attachment://sample.png'); something like this I'm guessing is where my mind was going

#

That's old code though no idea if it works lol

solemn latch
#

🤔

#

looks like it does

surreal notch
#
client.on("message", message => {
const thisWord = "Hey";
if(message.content.includes(thisWord))

      if(message.author.bot)return
  message.channel.send("Hey whats up")
})```
#

Why it is replying to all messages

thick gull
#

.includes

#

?

#

also your not doing anything

#

With the top if statement

#

if () {
code
}

grave smelt
#

UnhandledPromiseRejectionWarning: ReferenceError: RichEmbed is not defined, i don't understand...

sudden geyser
#

is it defined

thick gull
#

?

grave smelt
#

is it defined
@sudden geyser const Embed = new RichEmbed(), i think yes

sudden geyser
#

okay so where did you define RichEmbed

grave smelt
#

const {Client, RickEmbed} = require('discord.js')

sudden geyser
#

RickEmbed =/= RichEmbed

grave smelt
#

ah lol

sudden geyser
#

pretty much woo

thick gull
#

ah ok got something messed up myself then

sudden geyser
#

It is MessageEmbed in v12 borb

thick gull
#

ohok

snow urchin
solemn latch
#

dont you need to authenticate to use that endpoint?

restive furnace
#

^ yes

snow urchin
#

why am I so dumb lmao, thanks

earnest phoenix
#

How am I supposed to check if a user has server dms on or off?

solemn latch
#

hmm

amber fractal
#

Try to dm them

#

No other way afaik

solemn latch
#

yeah, im not seeing where you can see that

earnest phoenix
#

i tried try-catch

#

but no luck

candid knot
#

how should i do a bot with a automated request/buy system?

amber fractal
#

Well you'd get a missing permissioms error if you cant send

sudden geyser
#

thebeast can you show your code

amber fractal
#

Otherwise, there'd be no error

solemn latch
#

i thought it would be a missing access error for not being able to dm a user

#

no wait, thats not right.
missing permission for attempting to dm a user you cant

earnest phoenix
#
 const allcmdshelp = new Discord.MessageEmbed()
       .setColor('RANDOM')
       .setTitle('All commands')
       .setDescription('Ok, Dmed all commands to prevent clutter in chat')
       .setFooter(client.user.username,client.user.avatarURL());
         let a = await message.channel.send(allcmdshelp);
          try {
         message.author.send(moderation);
         message.author.send(general);
         message.author.send(fun);
         message.author.send(actions);
         message.author.send(music)
          } catch (err) {
              message.channel.send(`It seems I couldn't DM you, Do you have server messages on?`)
          }```
solemn latch
#

missing access for getting a user you dont have access to

sudden geyser
#

do you really need to dm the author 5 times

#

and you need to await those .send() calls

#

as they're async

earnest phoenix
#

he doesnt need to

#

but he should

topaz fjord
#

@snow urchin use a double !! to turn it into a boolean

#

e.g. !!json.voted

snow urchin
#

..

solemn latch
#

js handles numbers like booleans tho

opal plank
#

👀

solemn latch
cinder patio
#

more like... 0 is not a truthy value, so it's false

#

"" is also not a truthy value and so "" == false is true

sudden geyser
#

yeah but in this case scenario they're handled in the same way as booleans

solemn latch
#

in practice, it acts as a boolean

opal plank
#

he question is, are they the ones who are setting it to 0/1? or they receiving that data from somewhere?

solemn latch
opal plank
#

it makes more sense to set them to true or false, but a lot of API's work with 0/1 too

#

as long as its 0 or 1 it should be fine then

#

if he has to match 0,1,2,3 specifically might run into issues

#

@earnest phoenix you should probably concat those if they are strings or merge the object properties

faint prism
#

^

solemn latch
opal plank
#

yeah it completely fine then

#

fuck me, gonna have to type 5 essays worth of text now to update my docs -.-

solemn latch
#

o?

earnest phoenix
#

@earnest phoenix you should probably concat those if they are strings or merge the object properties
@opal plank Like message.channel.send([moderation, general, fun, actions, music]) ?

opal plank
#

not quite

#

how are you sending those?

cinder patio
#

Are those embeds or strings?

opal plank
#

im assuming its an embed

earnest phoenix
#

yes

#

embeds

opal plank
#

then you'd need to either loop them or make a single one

#

let obj = new embed;
for ( keys in object) {
obj.push(key)
}

#

something along those lines

#

just to get a gist

#

either way i gotta move now, got a lot of stuff to do

#

you're up feud!

cinder patio
#

You could make a reaction menu or have a command like help moderation and send a specific embed. I don't think sending 5+ embeds is a good idea

#

You could use a single embed, but you are then limited to only 25 fields

drifting wedge
#

can any1 help?

cinder patio
#

Depends on how you are structuring your help command

drifting wedge
#

im making a welcome thing

#
async def on_member_join(member):
    channel.send(wc)
    await discord.utils.get(member.guild.text_channels, name=welcomemsg)```
#

on_member_join
channel.send(welcomemsg)
NameError: name 'channel' is not defined

#

thats the error

#

it should be pulling from a json file

worn epoch
#

await?

misty sigil
#

yes

earnest phoenix
#

You could use a single embed, but you are then limited to only 25 fields
@cinder patio and i need to add 101 feilds

misty sigil
#

await

drifting wedge
#

?

quartz kindle
#

@earnest phoenix you're doing if NO author.id EQUALS id

drifting wedge
#
async def on_member_join(member):
    with open('welcome.json', 'r') as f:
        welcome = json.load(f)
    channel.send(wc)
    await discord.utils.get(member.guild.text_channels, name=741482536961835009)```
worn epoch
#

await channel.send

drifting wedge
#

i tried

quartz kindle
#

instead of if author.id NOT EQUALS id

drifting wedge
#

but its the channel id

#

it stored the id not the name

worn epoch
#

name... not id

drifting wedge
#

for example

worn epoch
#

I think

drifting wedge
#

this is what it is

worn epoch
#

ok Idk xD

misty sigil
#

!= lmfao

earnest phoenix
#

!=

winter shard
quartz kindle
#

!= for loose
!== for strict

misty sigil
#

you dont need tim for that give some of us the questions KEKW

solemn latch
#

the docs are pretty good

cinder patio
#

@earnest phoenix , then I suggest using a reaction menu, where you have to react to certain emojis to change the embed in the message, or a help command which takes one argument like moderation or fun and you show the moderation or fun embed

drifting wedge
#

like this is it now

#
async def on_member_join(member):
    with open('welcome.json', 'r') as f:
        welcome = json.load(f)
    channel.send(wc)
    channel = {wc}
    await channel.send('welcomemsg')
#

im really confused\

worn epoch
#

what about the menu thing? it is in discord.ext

earnest phoenix
#

@earnest phoenix , then I suggest using a reaction menu, where you have to react to certain emojis to change the embed in the message, or a help command which takes one argument like moderation or fun and you show the moderation or fun embed
@cinder patio YA

#

I might

worn epoch
#

message.edit

#

go to official python server

spare robin
#

i neeed programming of customisable prefix

misty sigil
#

database

#

we aren't gonna spoonfeed ya

spare robin
#

can you can give

sudden geyser
#

nein

misty sigil
#

spoonfeed: no lmao

#

quick.db is easy though

spare robin
#

i am doing with discord development

misty sigil
#

?!

spare robin
#

how i can make economy bot

misty sigil
#

with a database

#

on message you add some money/points

slender thistle
#

@drifting wedge

  1. You didn't define wc
  2. You didn't define channel
  3. You didn't await the .send part
worn epoch
#

quick.db is easy though
@misty sigil is there an alternative for python

slender thistle
#

sqlite3

spare robin
#

yes

worn epoch
#

ah

drifting wedge
#

@slender thistle

#

then @client.event async def on_member_join(member): await client.get_channel(wc).send(f"{welcomemsg}")

#

would this work?

slender thistle
#

At least, I don't remember a wrapper for sqlite3 with caching system

#

what's wc?

drifting wedge
#

welcome channel

#

from a json file

slender thistle
#

What is it defined as?

drifting wedge
#

but its stored as channel id

#

channel id

sinful belfry
#

@spare robin you need persistent data storage, such as a database. there are some pretty easy ones to get started with such as quick.db (https://www.npmjs.com/package/quick.db) and it is as simple as setting and retrieving values

worn epoch
#

you didn't open the file

slender thistle
#

Show your full code please

worn epoch
#

you have to open, then get the info, then close

drifting wedge
#

with open('wchannel.json', 'r') as f:
welcome = json.load(f)

#

this open it?

worn epoch
#

uh

#

yes?

drifting wedge
#

@client.event
async def on_member_join(member):
with open('wchannel.json', 'r') as f:
wchannel = json.load(f)
await client.get_channel(wc).send(f"{welcomemsg}")

#

then this is what i have

slender thistle
#

wc isn't the same as wchannel

drifting wedge
#

its not

#

welcome wchannel is the json file

#

wc is the id

slender thistle
#

What's welcomemsg

drifting wedge
#

the message the user set

#

and i gotta pull that json too

slender thistle
#

How exactly do you get it in the code

drifting wedge
#

@client.event
async def on_member_join(member):
with open('wchannel.json', 'r') as f:
wchannel = json.load(f)
with open('welcome.json', 'r') as f:
welcome = json.load(f)
await client.get_channel(wc).send(f"{welcomemsg}")

#

?

karmic compass
#

How do I make a guild specific thing happen? Like if someone said !logs (channel) then logs would appear for that channel for that guild

slender thistle
#

welcomemsg won't be defined in that snippet

drifting wedge
#

wdym

#

im a little new

sinful belfry
#

@karmic compass what lib?

karmic compass
#

Disc.js

spare robin
slender thistle
#

You have wchannel and welcome defined, but in that code, you don't define welcomemsg

sinful belfry
#

you can get the guild id from the message object and work from there @karmic compass

drifting wedge
#

oh

sinful belfry
#

identify the guild like that

karmic compass
#

Where do I store the data?

drifting wedge
#

ummm

sinful belfry
#

@spare robin never used that before, so im not entirely sure

drifting wedge
#

json file @karmic compass

spare robin
#

ooh no

spare robin
#

more anyone

sinful belfry
#

same thing

drifting wedge
#

how do you define welcomemsg

#

like where did i define wchannel and welcome

slender thistle
#

welcome = ... and wchannel = ...

karmic compass
#

quick.db got it

spare robin
#

please tell me

drifting wedge
#

wait wut

spare robin
#

@sinful belfry i am making from this application
@spare robin

drifting wedge
#
async def on_member_join(member):
    with open('wchannel.json', 'r') as f:
        wchannel = json.load(f)
    with open('welcome.json', 'r') as f:
        welcome = json.load(f)
   await client.get_channel(wc).send(f"{welcomemsg}")```
#

i ddint define anything

#

i jsut opened the jsons

sinful belfry
#

@spare robin i have honestly never used that before

spare robin
#

@drifting wedge i can used programming in my mobile

drifting wedge
#

idk lol

sinful belfry
#

i suggest to ask in their support server, if they have one

slender thistle
#

You are parsing the file content as JSON twice. I suggest you make a data variable value of which is json.load(f) and then just use data[x] to get the welcome message

pine aspen
#

Hi.

spare robin
#

can i can do in mobile programming

pine aspen
#

How could I push data into an array mongodb?

sinful belfry
#

you can use the $push operator

pine aspen
#

@spare robin wdym?

#

Ah.

slender thistle
#

updateOne with

drifting wedge
#

@slender thistle

slender thistle
#

ffs Starman

sinful belfry
#

lmao

drifting wedge
#

welcome json is the welcome msg

spare robin
#

pleae

slender thistle
#

Both welcome and wchannel are literally same JSONs (dictionaries)

#

They don't contain a specific guild's settings

drifting wedge
#

wchannel and welcome are 2 different jsons

#

they have the id of the guild

lusty quest
#

sounds like a json DB.

slender thistle
#

Oh wait I'm blind

#

What are contents of both files?

drifting wedge
#

1 sec

pine aspen
#

Wait, so like

const Guild = require('../../blah/blah'):

Guild.updateOne({ id: message.author.id }, { $push: { warns: {userid: message.author.id, reason: args.join(" ") }});
drifting wedge
#

wchannel: { "740715653295767562": "[#741482536961835009](/guild/264445053596991498/channel/741482536961835009/)", "666016790140157992": "[#724813075320143964](/guild/264445053596991498/channel/724813075320143964/)" }

pine aspen
#

Shivaco smthg like this? ^^

drifting wedge
#

welcome: { "740715653295767562": "welcome (user)", "666016790140157992": "welcome (user)" }

#

and it can be set to whatervwe

sinful belfry
#

Wait, so like

const Guild = require('../../blah/blah'):

Guild.updateOne({ id: message.author.id }, { $push: { warns: {userid: message.author.id, reason: args.join(" ") }});

@pine aspen that looks fine, give it a go i guess

drifting wedge
#

the welcome message can be whateve

pine aspen
#

Oh

#

Ill see.

drifting wedge
#

but the (user) thing is bugged

quartz kindle
#

why are channels mentions instead of ids

slender thistle
#

How's it bugged?

drifting wedge
#

well i tried to do (user) = member.mention

#

but it diddnt work

slender thistle
#

yourstring.replace("(user)", member.mention)

drifting wedge
#

some other guys said it has to be a int

slender thistle
#

It gets converted into a string in the end anyway

#

A mention is a string, an ID in d.py is an integer

drifting wedge
#
async def on_member_join(member):
    with open('wchannel.json', 'r') as f:
        wchannel = json.load(f)
    with open('welcome.json', 'r') as f:
        welcome = json.load(f)
    {welcomemsg}.replace("(user)", member.mention)
   await client.get_channel(wc).send(f'{welcomemsg}')```
#

so this?

#

it pulls both jsons

slender thistle
#

Again, welcomemsg doesn't exist

drifting wedge
#

?

slender thistle
#

you have welcome that loads the welcome messages but you don't have a single variable named welcomemsg

pine aspen
#

oh

#

wait

drifting wedge
#

i do

#

its not here

slender thistle
#

.replace returns a new string, so you'll need to re-assign a value to it

pine aspen
#

MongoError: '$set' is empty. You must specify a field like so: {$set: {<field>: ...}}

drifting wedge
#
def changewelcomemsg(client, message):
    with open('welcome.json', 'r') as f:
        welcome = json.load(f)

    return welcome[str(message.guild.id)]

@client.event
async def on_guild_join(guild):
    with open('welcome.json', 'r') as f:
        welcome = json.load(f)

    welcome[str(guild.id)] = '.'

    with open ('welcome.json', 'w') as f:
        json.dump(welcome, f, indent=4)

@client.event
async def on_guild_remove(guild):
    with open('welcome.json', 'r') as f:
        welcome = json.load(f)

        welcome.pop(str(guild.id))

        with open('welcome.json', 'w') as f:
            json.dump(welcome, f, indent=4)

@client.command()
@commands.has_permissions(manage_messages=True)
@commands.has_any_role('welcomeperms', 'adminperms')
async def changewelcomemsg(ctx, welcomemsg):
    with open('welcome.json', 'r') as f:
        welcome = json.load(f)

    welcome[str(ctx.guild.id)] = welcomemsg

    with open('welcome.json', 'w') as f:
        json.dump(welcome, f,indent=4)

    await ctx.send(f'welcome message changed to: {welcomemsg}')```
#

welcomemsg is the message set by the user

#

and welcome is the json file

strange trout
pine aspen
#

MongoError: '$set' is empty. You must specify a field like so: {$set: {<field>: ...}}
@pine aspen

slender thistle
#

Can't see welcomemsg defined anywhere still

drifting wedge
#

wait s

#

so to define welcome msg

#

how would i define it tho?

sinful belfry
#

@pine aspen can you send your code please?

drifting wedge
#
    {welcomemsg}.replace("(user)", member.mention)
NameError: name 'welcomemsg' is not defined```
#

yep you were right

pine aspen
#
const Guilds = require('../../models/guilds');
Guilds.updateOne({
    id: message.channel.guild.id 
}, { 
    $push: { 
            userID: message.author.id, 
            reason: "test" 
        }
    }
);
summer torrent
#

it should be a string

#

"{welcomemsg}"

drifting wedge
#

@client.event
async def on_member_join(member):
with open('wchannel.json', 'r') as f:
wchannel = json.load(f)
with open('welcome.json', 'r') as f:
welcome = json.load(f)
channel = wc
await channel.send('welcomemsg')
'{welcomemsg}'.replace("(user)", member.mention)

sinful belfry
#

@pine aspen where are you trying to push that to?

misty sigil
#

json db#?

drifting wedge
#

theyre .json files

pine aspen
#

To an array

sinful belfry
#

can you send an image of the database document?

pine aspen
#

Sure

drifting wedge
#

me?

#

o ok

sinful belfry
#

no syn lol

winter shard
pine aspen
#
{
    "_id": {
        "$oid": ""
    },
    "id": "",
    "prefix": "",
    "premium": ,
    "__v": ,
    "autoRole": [],
    "warns": [],
    "blacklist": 
}
#

To prevent any data leak

#

soz

solemn latch
#

client mods

#

ah

summer torrent
#

Client mods banhammer

torn ravine
misty sigil
#

client mods KEKW

sinful belfry
#

ok you need to do { $push: { warns: {authorID: aaa, reason: aaa } } }

#

because you're pushing to 'warns'

pure lion
#

Wait

#

You can push into an array on mongoose?

sinful belfry
#

yep

pure lion
#

:o

misty sigil
#

official mongodb too afaik

sinful belfry
#

^

pure lion
#

Sexyyyyyyy

drifting wedge
#

look this is what i have

#
async def on_member_join(member):
    with open('wchannel.json', 'r') as f:
        wchannel = json.load(f)
    with open('welcome.json', 'r') as f:
        welcome = json.load(f)
        channel = wc
    await channel.send('welcomemsg')
    '{welcomemsg}'.replace("(user)", member.mention)```
pine aspen
#
const Guilds = require('../../models/guilds');
Guilds.updateOne({
    id: message.channel.guild.id 
}, { 
    $push: { 
        warns: [
                {
                    userID: message.author.id, 
                    reason: "test" 
                }
            ]
        }
    }
);
#

so this?

drifting wedge
#

i need to defome we;cp,e ,sg

#

welcome msg*

#

but how?

sinful belfry
#

no, not with the square brackets @pine aspen

#

use curly brackets

pine aspen
#

it's an array?

pure lion
#

Pushing array into array

pine aspen
#

oh

#

Ok

drifting wedge
#

also how can i make it so the user can turn off welcome messages?

solemn latch
#

a database

drifting wedge
#

or just turn off any setting

#

id use a json file

#

but like how

solemn latch
#

json databases are the worst

pine aspen
#

MongoError: '$set' is empty. You must specify a field like so: {$set: {<field>: ...}}

#

back at this though

pure lion
#

Json "databases"

drifting wedge
#

which are good then?

pure lion
#

I'm well beyond that

#

:)))

drifting wedge
#

what are good database options?

karmic compass
#

i'm getting errors trying to install quick.db

solemn latch
#

it has some dependancies, check the troubleshooting guide

karmic compass
#

ok

fringe axle
#
      constructor(client) {
        super(client, {
          name: 'level-off',
          aliases: ['loff, levelsystem-off'],
          group: 'guild',
          memberName: 'level-off',
          description: 'Disable the level system',
          guildOnly: true,
          userPermissions: ['MANAGE_CHANNELS', 'MANAGE_MESSAGES']
        });
      }

Why users with no permissions can still use it?

solemn latch
#

youve not given enough info to help

#

what libs are you using?

pure lion
#

Where else are you using userPermissions

fringe axle
#

what libs are you using?
@solemn latch d.js v12 and Commando

#

Where else are you using userPermissions
@pure lion just in this

drifting wedge
#

just someone pls help

#

how can i define welcomemsg

#

?

#

its pulling from a json file

fringe axle
#

Code?

solemn latch
#

pretty sure thats a basic thing you do in python

drifting wedge
#
async def on_member_join(member):
    with open('wchannel.json', 'r') as f:
        wchannel = json.load(f)
    with open('welcome.json', 'r') as f:
        welcome = json.load(f)
        channel = wc
    await channel.send('welcomemsg')
    '{welcomemsg}'.replace("(user)", member.mention)```
fringe axle
#

Python, I'm out.

drifting wedge
#

p,fg

#

omfg

#

it was so imple lol

solemn latch
#

its basic python

#

🤔

drifting wedge
#

well I DONT KNOW BASIC PYTHON

#

but ill try it

ornate needle
#

Learn basic python first

drifting wedge
#

ya know

#

i will but i wanna do my bot first

slender thistle
#

But why are you making a Discord bot without knowing basic Python?

solemn latch
#

^

drifting wedge
#

But why are you making a Discord bot without knowing basic Python?
@slender thistle idk

solemn latch
#

learn python first

silver rapids
#

i will but i wanna do my bot first
good luck

drifting wedge
#

ill do html first tho

silver rapids
#

lmao

drifting wedge
#

i have a vr class

solemn latch
#

??

drifting wedge
#

so ill have to learn html

#

after ill learn py

ornate needle
#

Then code bot after learning basic py

slender thistle
#

That's not exactly a valid reason, you'll be struggling a lot more if you maintain a Discord bot without basic knowledge of Python

drifting wedge
#

ill try

#

bruh i started like 4 days ago

solemn latch
#

@fringe axle im really not sure why anyone would be able to use it

fringe axle
#

Yea

#

Me too

#

Now id is undefinded

#

xD

solemn latch
#

whats the error

fringe axle
#

Wait

solemn latch
#

the problem is what your using .id on is undefined

fringe axle
#

I'll fix it

#

@solemn latch any idea? xD

solemn latch
#

whats your code?

fringe axle
#
const { Command } = require('discord.js-commando');
const { prefix } = require('../../config.json');
    const { MessageEmbed } = require('discord.js');
    const fs = require('fs');
    const Discord = require('discord.js');
    const Canvacord = require("canvacord");
    const db = require('quick.db');
    const canvas = new Canvacord()
    
    module.exports = class HelpCommand extends Command {
      constructor(client) {
        super(client, {
          name: 'level-off',
          aliases: ['loff, levelsystem-off'],
          group: 'guild',
          memberName: 'level-off',
          description: 'Disable the level system',
          guildOnly: true,
          userPermissions: ['MANAGE_CHANNELS', 'MANAGE_MESSAGES']
        });
      }

      async run(client, message, args, [target]) {
        const user = message.mentions.members.last() || message.guild.members.cache.get(target) || message.member;
        let levelsystem = await db.fetch(`levelsystem_${message.guild.id}`);

        db.set(`levelsystem_${message.guild.id}`, 'off')
        const userFlags = member.user.flags.toArray();
        const embed = new MessageEmbed()
        .setDescription('The level-system turned off')
        .setColor('#ea6ef1')
        .setAuthor('| Level System', 'https://cdn.discordapp.com/avatars/714745136122429491/e16289a6de8bd22fb433b1e029fe98e1.png?size=2048')
        .setTimestamp()
        .setFooter(`Requested by ${message.author.username}#${message.author.discriminator}`);
        message.channel.send(embed)
        }
      }
drifting wedge
#
AttributeError: 'dict' object has no attribute 'send'```
fringe axle
#

Woo it's above xD

drifting wedge
#

what does this mean?

solemn latch
#

learn python before making bots 🤔

fringe axle
#

xD

livid plover
#

D

#

Hi

solemn latch
#

heya

fringe axle
#

Any idea why it's not working Woo?

livid plover
#

Plis give mi credt

solemn latch
#

!givewoobux @livid plover

livid plover
#

Plisss🥺🥺🥺

pure lion
#

Yooo!

slender thistle
#

Did you read this channel's topic?

pure lion
#

My game engine does||nt|| work

solemn latch
#

do you have the full error @fringe axle ?

#

the one logged in console

fringe axle
#

No

#

No console error.

solemn latch
#

just making sure, is your quick.db usage correct?

fringe axle
#

Yes

#

Worked before.

#

Before I added permissions. xD

#

Any idea?

#

Wait

#

I'll try an if statement

solemn latch
#

you have a lot of unused dependancies

#
    const canvas = new Canvacord()
    const fs = require('fs');
    const Discord = require('discord.js');
    const { prefix } = require('../../config.json');
#

all are unused

#

and

        const user = message.mentions.members.last() || message.guild.members.cache.get(target) || message.member;
        let levelsystem = await db.fetch(`levelsystem_${message.guild.id}`);
        const userFlags = member.user.flags.toArray();
#

are also unused

#

which, if levelsystem is unused, that means quick.db is also unused

pure lion
#

Mentions.last, why?

misty sigil
#

.last lmao

pure lion
#

Don't you wanna either do forEach() or first()

solemn latch
#

not like the order matters

#

a database

#

and getting/setting by userid

#

depends on the database you use

misty sigil
#

Looking for SQL or noSQL?

#

if sql, mySQL, sqlite, SQL so on so on

solemn latch
#

we cant choose your database for ya, its something you should do research on and make your own choice imo

misty sigil
#

if noSQL, mariadb, mongodb, so on so on

#

depends what you wanna do

fringe axle
#

How nice

solemn latch
#

🤔

fringe axle
#
      async run(message, args, [target]) {
        const member = message.mentions.members.last() || message.guild.members.cache.get(target) || message.member;
        if(!message.member.hasPermissions("ADMINISTRATOR")) {
          return message.channel.send("You don't have the permissions to use this command!")
        }

        let levelsystem = await db.fetch(`levelsystem_${message.guild.id}`);

        db.set(`levelsystem_${message.guild.id}`, 'off')
        const userFlags = member.user.flags.toArray();
        const embed = new MessageEmbed()
        .setDescription('The level-system turned off')
        .setColor('#ea6ef1')
        .setAuthor('| Level System')
        .setTimestamp()
        .setFooter(`Requested by ${message.author.username}#${message.author.discriminator}`);
        message.channel.send(embed)
        }
      }
solemn latch
#

does commando stop you from getting full errors?

#

that really is annoying

#

thats just a code editor

#

thats like saying, how can i draw a picture on paper

misty sigil
#

you need a database

solemn latch
#

it makes no sense

#

you need to get a database

misty sigil
#

preferably a database would be hosted

solemn latch
#

like i said, you should really do research on this

misty sigil
#

quick.db is a good sqlite3 wrapper

#

very simple

solemn latch
thin turret
#

Lol

misty sigil
#

database

solemn latch
#

how to choose a database?

misty sigil
#

sql or nosql

#

all depends what u want ngl

lusty quest
#

both Database Architectures have Pros and Cons.

solemn latch
#

pendrive? as in a usb?

#

thats a very bad idea

thin turret
solemn latch
#

usb's are extremely unreliable

lusty quest
#

i never tought i find something more stupid than a Json DB

solemn latch
#

LOOL

amber fractal
lusty quest
#

to be fair some OS only run of a USB drive. Unraid is a example.

solemn latch
#

hi

lusty quest
#

did you want to have the bot running locally all the time?

#

did you want to ahve the bot Running locally all the time?

solemn latch
#

SSD's are fine, probably should get a proper host tho

#

if you google, and do your own research, itll help a lot

#

and clarify a lot

fringe axle
#
      async run(message, args, [target]) {
        let levelsystem = await db.fetch(`levelsystem_${message.guild.id}`);
        db.set(`levelsystem_${message.guild.id}`, 'off')
        const member = message.mentions.members.last() || message.guild.members.cache.get(target) || message.member;
        const userFlags = member.user.flags.toArray();
        if(!member.hasPermission("MANAGE_MESSAGES")) {
          return message.channel.send("You don't have the permissions to use this command!")
        }

        const embed = new MessageEmbed()
        .setDescription('The level-system turned off')
        .setColor('#ea6ef1')
        .setAuthor('| Level System')
        .setTimestamp()
        .setFooter(`Requested by ${message.author.username}#${message.author.discriminator}`);
        message.channel.send(embed)
        }
      }
solemn latch
#

normally id be able to spot the issue pretty quickly, but because you dont have the full error, im not sure.

fringe axle
#

;__;

#

Wait

#

I can run it in VSC

lusty quest
#

a line would help

#

but i guess levelsystem is somewhere called with a empty result

fringe axle
lusty quest
#

nice you broke your DB

fringe axle
#

I broke my life

cinder patio
#

Vale, are you using discord.js?

lusty quest
#

it expects a positive value but you get a negative one

fringe axle
#

Yes

#

Means?

cinder patio
#

I don't see <User>.flags anywhere in the docs https://discord.js.org/#/docs/main/stable/class/User

solemn latch
#

f rip db

lusty quest
#

overwrite all levels to be 0 and prevent negative levels

cinder patio
#

Unless you added that in

fringe axle
#

I only wanted to add permissions...

lusty quest
#

map them

fringe axle
#

oof...

#

D:

cinder patio
#

You aren't even using the userFlags variable in the first place, why not remove it?

solemn latch
#

hes using commando tho

lusty quest
#

rip

solemn latch
#

yeah, i mentioned all the unused things

#

like half the lines in this code snippet are unused

quartz kindle
#

user.flags exists, no idea why its not documented

fringe axle
#

Okay

quartz kindle
fringe axle
#

I broke quick.db.

#

That's the problem

cinder patio
#

That's weird

amber fractal
#

Do they have it ignored in their doc builder script?

fringe axle
#

OOF

#

quick.db was the problem

solemn latch
#

ay

#

i was right

amber fractal