#development

1 messages · Page 1267 of 1

opal plank
#

this case for regex i find good

autumn aspen
#

this case for regex i find good
@opal plank was the pic for me?

slender thistle
#

But what can indexOf("<@") return in, say, lalala <@ ululu?

earnest phoenix
#

wuts regex
and should i use it in a botum

quartz kindle
#

the numeric index it is placed at in the string

opal plank
#

yes

quartz kindle
#

in the above case: 7

opal plank
#

^^

#

it returns the position in the string

slender thistle
#

index of which cha- yeah makes sense now

opal plank
#

the index

shy turret
#

@autumn aspen wait oh

#

try this (message.mentions.users.first()).id;

opal plank
#

add a ?

white vapor
#

are free trials ok for temporary issues because heroku has Error waiting for network: Resource temporarily unavailable

opal plank
#

or check for it

#

conditional chaining ftw

faint prism
#

are free trials ok for temporary issues because heroku has Error waiting for network: Resource temporarily unavailable
@white vapor what free trial?

white vapor
#

for hosting

faint prism
#

just host yourself

quartz kindle
#

im still running node 12 in prod

opal plank
#

OOOF

quartz kindle
#

waiting for 14 to become lts

opal plank
#

i think mine is at 14.6

quartz kindle
#

i also need to update my ubuntu from 18 to 20

opal plank
#

it has been behaving wonderfully

#

havent found a single issue in it

rancid sand
#

@faint prism is there a specific user agent you recommend for mobile? Basically need to grab the html as fast as i can

opal plank
#

mine is running 18 aswell iirc

#

Tim

#

can i flex?

faint prism
#

An extra header won't slow it down

shy turret
#

(cropped image, well attempted to)

cinder patio
#

is it responsive?

faint prism
#

It's relative mmLol

opal plank
cinder patio
#

That's the hard part

autumn aspen
#

@autumn aspen wait oh
@shy turret in what command

#

show an example

#

bc it wrong

#
 if (message.mentions.users.first()).id; return msg.channel.send(":x: **Sorry drat!** :x:");```
opal plank
#

bad ^^

autumn aspen
#

oh

opal plank
#

UNHANDLER ERROR cannot read property id of undefined

hazy sparrow
#

What is the use of a eval command

sonic lodge
#

that's some wow syntax

opal plank
#

either conditional chaining or check if mentions exist

autumn aspen
#

yes but show an example how I should put it

opal plank
#

read the docs

#

¯_(ツ)_/¯

sonic lodge
#

@hazy sparrow for if you ever want to run code through discord

hazy sparrow
#

eh

dense nest
#

So im using a json file to save my server prefixes but when i restart the bot it dosent register the prefixes. And just uses the default prefix. If you do the commamd to change the prefix again it just puts another store in like the first one isint even there

hazy sparrow
#

So i can make new commands in discord itself?

opal plank
#

bad idea to have your prefixes in json @dense nest

dense nest
#

What should I use @opal plank

opal plank
#

json is probe to corruption, use json for stuff that doesnt change

#

use a dabatase

sonic lodge
#

you don't use your eval command to develop

hazy sparrow
#

Bad idea to use json as a database @dense nest

opal plank
#

you do use eval to develop

dense nest
#

How in tf would i use a database

opal plank
#

eval helps a lot for debugging

hazy sparrow
#

you don't use your eval command to develop
@sonic lodge no i mean could i?

sonic lodge
#

as in make an entire command through your bot's eval command lol

opal plank
#

cuz u can access initialized code

sonic lodge
#

yes you could make a command

opal plank
#

nah, in your index

#

thats one of the few cases i recommend having codes in the index

hazy sparrow
#

like !eval <command code here>

opal plank
#

can you can branch off from the index to your other files

#

you basically have the debugger to check the code as it runs and the eval to fetch values and data from stuff your debugger isnt attached to

#

i highly recommend eval for production

faint prism
#

How in tf would i use a database
@dense nest A similar way you are using JSON

hazy sparrow
#

Kk

sonic lodge
#

why do you want to make commands through discord though

dense nest
#

@faint prism help? Lol.

sonic lodge
#

when you have a nice code editor with syntax highlighting and all that good stuff

faint prism
#

@faint prism help? Lol.
@dense nest just look into quick.db or something

#

just don't use json for mutable data

opal plank
#

eval isnt for making code @sonic lodge

#

its a good tool for debugging

#

and testing

#

thats about it

sonic lodge
#

it's what bow pro is asking for

opal plank
sonic lodge
#

So i can make new commands in discord itself?

opal plank
#

could? yeah

#

should? no

sonic lodge
#

my reaction ^

opal plank
#

i guess you could even fancy it up even more and fsWrite() new files with your code in it

#

¯_(ツ)_/¯

#

and then require it

sonic lodge
#

that's massive brain

opal plank
#

i already have dynamic requires

#

adding new commands to production easy

#

put file in

#

type n.reload

#

done, everything else is handled internally

#

the cache is deleted and the metrics are reloaded too

sonic lodge
#

so it actually might be practical to have a command that makes commands

#

nice

opal plank
#

not quite

#

like i said, i just need to put the file there

#

i use git to do that

#

even with the production server on

#

no need to shutdown to add commands

#

neither for my global handlers nor for the commands

#

i havent added dynamic gauges nor functions though

#

YET

#

im so proud of my handler tbh

#

All errors are dumped in here

#

So console spam whatsoever

#

simply check the dashboard now to check if i had any error throughout the code

sonic lodge
#

:o

#

that error dumping is actually p cool

opal plank
#

Dumping, Dynamically handling, and dynamically updating

fervent goblet
#

anyone know how to add header when requesting from an api with node-superfetch?

sonic lodge
#

if you don't mind i'll steal your idea

opal plank
#

go ahead

#

¯_(ツ)_/¯

#

i require royalties tho

#

👀

sonic lodge
#

do you accept brains

opal plank
#

payment in lasagna only

#

||or vodka||

sonic lodge
#

🍝 🍺

opal plank
sonic lodge
#

wait that's not my brain

opal plank
#

Thats not even the tip of the iceberg of good ideas i implemented in the bots tbh

sonic lodge
#

ok so now i need your brain

fervent goblet
#
const request = require('node-superfetch')
          const { body } = await request
      .get('https://abstractlist.com/bots/701510083133309039/stats').set({"Authorization": config.abstractListToken })

      console.log(body)

it just says 404 Not Found

#

idk if thats how i add headers

white vapor
#

how do you make a new line in node.js

opal plank
#

\n

white vapor
#

k

earnest phoenix
#

@opal plank how do u update dynamically

#

without downtime

opal plank
#

re-require cache

#

delete and then re-require it

earnest phoenix
#

Oh lol

#

I thought u had something more bulky in place

modest smelt
#

I have a question

opal plank
#

i do

modest smelt
#

i installed SQL workbench

opal plank
#

but thats the gist

modest smelt
#

how do i use it?

snow urchin
#

Why won't my bot start? No error at all, just the logs from handlers

earnest phoenix
#

Listen to the debug event

modest smelt
#

@opal plank do u know SQL?

earnest phoenix
#

@modest smelt google does

modest smelt
#

i tried searchin it

#

idk how to set it up tho

#

for my bot

earnest phoenix
#

Then you either cant use google or it doesnt exist

modest smelt
#

i would say the first one

opal plank
#

@modest smelt yeah, i use postgres

#

so im a bit familiar with SQL

modest smelt
#

ok

#

so how would i use it for my bot?

#

i installed SQL workbench

opal plank
#

reading the docs and adding a library to bridge over the database and your code

#

depending on what you're doing, i'd go for postgres

#

rather than SQL

modest smelt
#

i just want a database

umbral zealot
#

MySQL workbench is a client not a server, you still would need to install an actual database server to use mysql.

modest smelt
#

so what should i do?

umbral zealot
#

I would strongly advise against MySQL specifically because it's shit to install and run

modest smelt
#

im looking at w3 schools

umbral zealot
#

If you just need a database, I'd just suggest using SQLite, since it's actually server-less and easy-ish to install

modest smelt
#

alr

umbral zealot
#

it's "just a file" (made the right way, as a true database, just not a server/client architecture)

modest smelt
#

ill look at it l8er

umbral zealot
#

And if you really want to make your life super easy, assuming you're in nodejs, check out https://enmap.evie.dev/ (disclaimer: I made this)

misty sigil
#

nice

split hazel
#

mysql can be really powerful if you set it up just right uwuSnuggle

#

but you should use mariadb over mysql as much as possible

modest smelt
#

how should i set it up?

split hazel
#

if you have no idea take evies advice

#

use a client side database

modest smelt
#

kk

balmy mortar
#
await bot.edit_message(embed=embed2)```
#

Instance of 'Bot' has no 'edit_message' member

#

why is it saying this?

sonic lodge
#

there is no function edit_message available on bot

#

seems like you should be using message.edit instead

opal plank
#

that py i think

sonic lodge
opal plank
#

i might add queries into the dashboard tbh

sinful thistle
#

looking for a bot developer to help me code a Anti Raid bot

misty sigil
#

@split hazel

split hazel
#

-needdev @sinful thistle

gilded plankBOT
#

@sinful thistle

DBL is not a place to find developers for jobs. You can try and put a request on Fiverr or Freelancer. Please do not post the request again. Doing so may result in punishment.

sinful thistle
#

o

#

thanks @split hazel

stark abyss
#

how do you use ` inside your `` string

cinder patio
#

You escape it with \

earnest phoenix
#

escape it

#

^^

stark abyss
#

okay

white vapor
earnest phoenix
#

you have two instances running

#

or you're listening to the event twice

honest perch
#

ok ive only used this for a couple mins

#

but

#

good

earnest phoenix
#

Yo wtf are u doing

#

Oh i thought that was html

#

@honest perch also id use ejs for simpler things

honest perch
#

but you see its not like ejs

#

its different

white vapor
#

how do you stop running your bot after doing node .

honest perch
#

cntrl c

white vapor
#

k

drifting wedge
#

client = commands.Bot(command_prefix = commands.when_mentioned_or(f'{prefix}'))

#

how can i make the prefix on mention or with a var?

autumn aspen
#

Guys if u wanna mark and move all the commands to right how u do? ctlr -> or what?

#

pls help

opal plank
#

huh?

autumn aspen
#

@stark abyss

#

oops

opal plank
#

mark and move all commands to the right?

stark abyss
opal plank
#

mark what?

#

move where?

stark abyss
autumn aspen
#

look

opal plank
#

what is int he right?

#

leigibility

#

what is life?

#

what is love?:

stark abyss
#

erwin you ok?

opal plank
#

nah, it the level of questions that are sometimes asked that borks me

stark abyss
autumn aspen
#

look

#

I wanna move me

#

em

opal plank
#

add spaces

drifting wedge
#

client = commands.Bot(command_prefix = commands.when_mentioned_or(f'{prefix}'))
how can i make the prefix on mention or with a var?
ping me plez

opal plank
#

middle mouse drag in the beggining

autumn aspen
#

how

slender thistle
#

I didn't get a single fucking thing from that message

#

wdym prefix on mention

drifting wedge
#

so like mention works as a prefic

autumn aspen
#

wdym prefix on mention
@slender thistle me?

drifting wedge
#

me

opal plank
#

@autumn aspen

#

middle mouse

#

though you should use a linter

#

whatever the fuck you doing in your code is just making it a mess

autumn aspen
#

no lol

opal plank
#

yes

slender thistle
#

mention

slender thistle
#

works as prefix

#

is literally

opal plank
#

this is messy'fying your code

slender thistle
#

what you have

#

"When mentioned or some other prefix"

earnest phoenix
#

Stop using useless f string smh

autumn aspen
#

this is messy'fying your code
@opal plank dont care abtwhat I do haha just what u mean drag just show me a mouse cam and jey

#

keyboard

opal plank
#

i told you

#

middle mouse

#

then space

#

thats it

autumn aspen
#

oh thx

opal plank
drifting wedge
#

"When mentioned or some other prefix"
@slender thistle so the prefix is the bot mention or a var

slender thistle
#

Did you read the docs on what when_mentioned_or does

drifting wedge
#

yea

autumn aspen
#

:NGNLKaeriThumbsUp:
@opal plank I tried and it didnt work?

opal plank
#

i literally showed it working

slender thistle
#

Did you really

slender thistle
#

What did they say

eternal osprey
#

why is my variable undefined as error

drifting wedge
#

it said that i can use when_mentiobed as a event or as a prefix thingy

eternal osprey
#

in this line: message.channel.send(${statuses.statuses.text})

opal plank
#

its in meta

#

not in statuses

earnest phoenix
#

using when_mentioned as an event? MegaThonk

eternal osprey
#

it isn't

opal plank
#

actually

#

it isnt

#

erm

#

scroll up higher

slender thistle
#

As a what

#

How event

#

Where

eternal osprey
slender thistle
#

Did I miss out on a new random update or what

#

how is when_mentioned an event

eternal osprey
autumn aspen
#

w

opal plank
#

statuses is an array

#

[].statuses is error

#

array dont have statuses

earnest phoenix
#

Did I miss out on a new random update or what
You simply didn't

autumn aspen
#

@opal plank but dude what u mean drag with what button on mouse bc its only delete the code

eternal osprey
#

huh

autumn aspen
#

Im slow

#

Pls show dm

#

no I mean cam

opal plank
#

statuses returns an array

#

which doesnt have property text in it

#

get one of that status you want

#

from that array, THEN get .text

autumn aspen
#

@opal plank not erwin show cam mouse and keyboard

opal plank
#

no

autumn aspen
#

bc Isaw how u did but dont know how

#

like

opal plank
#

i told you, hold middle mouse button

eternal osprey
#

could you provide me a site on how to get it as .text

opal plank
#

what?

autumn aspen
#

i told you, hold middle mouse button
@opal plank middle mouse that Im scrolling with

#

or what

opal plank
#

you dont get an array as a .text

eternal osprey
#

the docs for this

opal plank
#

you pick an entry inside the array

#

@autumn aspen hold it

#

click it and hold

autumn aspen
#

and then

opal plank
#

drag it around

autumn aspen
#

ok

#

click it and hold
@opal plank I did it and nothing worked

opal plank
#

then you doing something wrong

#

¯_(ツ)_/¯

autumn aspen
#

yes but what

opal plank
#

just add spaces manually then

autumn aspen
#

just add spaces manually then
@opal plank I marked it and now?

#

so do I press anything

opal plank
#

you telling me you dont know how to add spaces in your code?

autumn aspen
#

or hold

opal plank
autumn aspen
#

:NotLikeMiya:
@opal plank I do

opal plank
#

then do it

autumn aspen
#

but ur way

opal plank
#

press space bar

#

'my way' aparently is too complicated for you

#

just do it the old way

#

and add spaces on each line

autumn aspen
#

but man what u mean middle button

opal plank
#

i told you how

#

middle click and hold it, then just drag it around

autumn aspen
#

whats that?

opal plank
#

my dashboard

#

for leviathan

#

i gotta add a third for Youtube now

earnest phoenix
opal plank
#

are you not using a lib that doesnt aht already?

sweet ruin
#

without lags eh. there is only so much you can do with that

#

but i mean just do some simple forEach thing

opal plank
#

client.users should already have cache

#

bad

#

forEach prob some of the least performant loops

#

use for()

sweet ruin
#

Hello all. I am trying to code a command that allows server managers to set roles that are awarded when a member reaches or is above a certain level. I have made the command part of it. but i dont know how to make it so server managers can add multiple role rewards for multiple levels in one command. how do I do this?

opal plank
#

database

sweet ruin
#

mongodb

#

(forgot to say sorry)

opal plank
#

| threshhold | role id | server id |

#

query by server id, select all

#

then check if the threshhold has been passed

#

if so, award user

#

i'd highly recommend NOT doing this on every iteration of message

#

if you start needed it on a bigger degree, have it stored in memory

#

use redis or store it yourself

sweet ruin
opal plank
#

i dont know mongo, im telling you the framework you should use

sweet ruin
#

ah thanks

opal plank
#

Im familiar with the syntax for types and PostgreSQL though

#

should you not be using primitive types?

sweet ruin
#

huh?

faint prism
#

Aren't those privative?

sweet ruin
#

(sorry legit databases gimme headache even when I understand them)

opal plank
#

Number is object warpper

#

wrapped*

faint prism
#

MongoDB has it's own datatype names

opal plank
#

number is primitive

#

then that might be the thing

faint prism
#

Those are all primitive

opal plank
#

i'd assume it was standartized

#

number =/= Number

cinder patio
#

That's TS, are they using typescript

sweet ruin
#

im using js

cinder patio
#

In regular JS there is no number

opal plank
#

dont think so from the looks of it

faint prism
#

coulda sworn mongodb has number..

sweet ruin
#

i use Number to define what type something is

#

in the database coding models

faint prism
#

I mean, objects are fine too

sweet ruin
#

objects confuse me more than arrays

#

and i just have no idea how to make them or smth

faint prism
#

an object is an instance of a class

opal plank
#

auger

faint prism
#

it's a variable's value basically

#

auger
@opal plank aye

opal plank
#

explaining classes to someone who doesnt know objects is a bit overkill

#

lmao

faint prism
#

class is the template for some data structure/functions
object is an instance of that class with values

#

they go hand in hand

opal plank
#

you're walking backwards dude

#

need simplier syntax

faint prism
#
class Person  // the class ie. "blueprint"
{
  string Name;
}

var newPerson = new Person() { Name = "Jeff" };  // an object

newPerson.Name == "Jeff";  // this is true
earnest phoenix
#

How do I know how many of the same string are in the json file?

test.json.length?

faint prism
#

How do I know how many of the same string are in the json file?

test.json.length?
@earnest phoenix no. Length is the amount of characters iirc

#

For finding the same string you'll need to do some comparisons

opal plank
faint prism
#

or some js magic

#

oh right

#

js uses prototypes

opal plank
#

porbably easiest way to explain objects is with examples

#

its too simple

#

usually you learn classes down the line

#

so using it as a comparator is quite hard to grasp

#

you can do functions directly too

#
console.log({im_a_property: 'a',im_another_function() {console.log('function')}, im_a_proprity_with_object: {hi:'hi', foo: 'hello'}, im_an_array: ['hi', 'bar'], im_a_function: () => {console.log('honey')}})```
white vapor
#

how do i add a - before the random number

            message.channel.send(Math.floor(Math.random() * 1000000000000000000 + 1))
            break;```
dire obsidian
#

this is only for bots right?

opal plank
#

'-' + whatever

#

or use templates

#

this is only for bots right?

#

what?

dire obsidian
#

if this is only for bots

opal plank
#

'this' what?

dire obsidian
#

like i just can ask for bot dev support

opal plank
#

technically yeah but programming related is fine too

#

not support for specific bots though

#

for that you need to dm the author of the bot

#

im gonna flip if i see another 'InviteManager is offline, what do i do?'

dire obsidian
#

ohhh ok

white vapor
opal plank
#

then u didnt do what i said jeremy

#

either template literals or join them

white vapor
#
            message.channel.send('-', Math.floor(Math.random() * 1000000000000000000 + 1))
            break;```
opal plank
#

@dreamy cedar no commands here

#

not ,

dreamy cedar
#

oh sorry

white vapor
#

ohhh

dreamy cedar
#

i thought am in testing

white vapor
#

ok now its working

opal plank
autumn aspen
#

I have a config.json I put my command and token there and I tried to make a ban.js and I put require config.json from there and it didnt work?

#

Like a put both require things in ban.js

#

And still dont a command handler?

#

Why

#

Someone?

#

Bc I put token and prefix in config.json

#

And from there I want the command handler

#

So anyone help, shold I npm i something or what?

white vapor
#

am i able to transfer this code
message.channel.send('-' + Math.floor(Math.random() * 1000000000000000000 + 1))
to an embed

#

or do i have to heavily modify it

opal plank
#

send the message payload directly with an object

autumn aspen
#

@opal plank can u pls read my message abive

#

above

autumn aspen
long lantern
#

Brasil?

#

Alguém

#

T^T

opal plank
drifting wadi
#

Hi, does someone can help me with my bot? I'm trying to access a variable from an event. The variable is created when executing a command.

The bot is in Node.js and Discord.js
Thanks ^^

sudden geyser
#

@drifting wadi what variable? Can you show us your source code so we can have a good idea of what the scope is

drifting wadi
#

Sure!

#

Now I'm not at home, later I will send the code

drifting wadi
#
   if(command == 'autocanaldevoz') {
    let activado = 1
    async function createChannel() {  
      const idcanal = await message.guild.channels.create  ('Sala Privada', {
        type: 'voice',
        permissionOverwrites: [
            {
                id: message.guild.id,
                allow: ['VIEW_CHANNEL'],
            }]
        })
      return idcanal
      }  
      createChannel()
      
}

client.on('voiceStateUpdate', (oldMember, newMember) => {
  let newUserChannel = newMember.voiceChannel
  let oldUserChannel = oldMember.voiceChannel

if(newMember.voiceChannelID == idcanal.id){
if(activado == 1){
  if(oldUserChannel === undefined && newUserChannel !== undefined) {
    async function createChannel() {  
      const nuevocanal = await message.guild.channels.create  (`Sala de ${newUserChannel}`, {
        type: 'voice',
        permissionOverwrites: [
            {
                id: message.guild.id,
                allow: ['VIEW_CHANNEL'],
            }]
        })
      return idcanal
      }  
      createChannel()
      
}

  } else if(newUserChannel === undefined){

    // User leaves a voice channel

  }}
})
#

Here it is

earnest phoenix
#

How do I count how many trues are in a json file?

[
    {
test: true
    },
    {
test: true
    },
{
test: false
}
]

return: 2

faint prism
#

@earnest phoenix reserialize it and increment an integer for each array item that has test as a positive boolean

#

Not too difficult

fathom tangle
#

Someone makeing bot with bot designer for discord?

faint prism
#

Someone makeing bot with bot designer for discord?
@fathom tangle No lmao

earnest phoenix
#

what?

fathom tangle
#

@fathom tangle No lmao
@faint prism ok lol

misty sigil
#

dude

#

nobody here likes bot designers

drifting wedge
#

client = commands.Bot(command_prefix=commands.when_mentioned_or(f'{prefix}'))

#

does this work?

#

no errors

#

but the prefix var doesnt work

#

is the _or valid?

boreal iron
#

Is it possible to change the online status of the bot without a WSS stream to the gateway?

Imma using simple cURL requests time by time to scan channel messages.
I would like show the bot as online in the member list.

stray sinew
#

is there any way to transfer glitch code to a raspberry pi?

drifting wadi
#

do you mean Glitch website?

faint prism
#

Oooh that's a gem

#

Someone migrating from glitch to their own host

drifting wadi
#

hahahahaaha

opal plank
#

the legends are true it seems

faint prism
#

is there any way to transfer glitch code to a raspberry pi?
@stray sinew yes, there is a way to transfer your javascript project to a raspberry pi

#

But someone else might be more familiar than I am

opal plank
#

git clone i assume

#

is it heroku or glitch that uses repos?

#

either way, just make a repo for it. Worst case scenario, just copy everything from the website manually and save file by file

stray sinew
#

oh wow ty

#

its a discord.js

#

is that allowed?

#

there isnt any youtube video

#

oh wow ty

thick gull
#

heroku uses repos

opal plank
#

Sometimes i wonder what goes thru people's minds to do this ^^

boreal iron
#

Is it possible to change the bot presence with an API request for example via. cURL?

misty sigil
#

you need a wss connection i'd assume

boreal iron
#

Permanently or just once a time like the gateway registration?

opal plank
#

you mean status?

#

rich presence isnt available for bots @boreal iron

#

if you mean DnD, online, invisible, those can be changed after gateway

boreal iron
#

Yeah just the online status.

opal plank
#

yeah that can be changed on the go iirc

#

which lib u using?

boreal iron
#

Imma simply curling the API time by time with PHP. I don’t need a permanent connection.

But the fact the bot is “offline” is annonying

#

No library

opal plank
#

lemme see if i can find the doc for that rq

boreal iron
#

Ty

graceful dock
#

Check discord developer docs

boreal iron
#

I did

#

Found nothing related to the user status

earnest phoenix
#

To remove the bot’s offline status it needs to have a heartbeat

#

So u need a ws connection

boreal iron
#

Thought I could easily POST the status to the API for example POST /api/v6/users/@me

earnest phoenix
#

Nope

boreal iron
#

Ah ok

#

Sad for me

#

Is there a timeout between the heartbeats?

#

Gonna think about to create a simple JS wss connection just sending heartbeats each second/minute?!

drifting wedge
#

how can i make this work

#

client = commands.Bot(command_prefix=commands.when_mentioned_or(f'{prefix}'))

obtuse niche
#

Py?

autumn aspen
#
bot.on('message', message => {
    if (message.content === '/help') {

        const embed = new MessageEmbed()
        .setTitle('General Commands')
        .setColor(0xff0000)
        .setDescription('myavatar');

        message.channel.send(embed);
    }
});

``` why is thhis wrong?
#

@slender thistle

sudden geyser
#

What's wrong with it? Didn't you write it

opal plank
#

imagine pinging someone who works with Python

autumn aspen
#

What's wrong with it? Didn't you write it
@sudden geyser yes

opal plank
autumn aspen
#

lmao

sudden geyser
#

So what is wrong with it

autumn aspen
#

idk it gived me a err

opal plank
#

did you import MessageEmbed?

#

no shit

#

shows us the error

autumn aspen
#

pk

#
C:\Users\admin\reportbot\index.js:62
        const embed = new MessageEmbed()
                      ^

ReferenceError: MessageEmbed is not defined
    at Client.<anonymous> (C:\Users\admin\reportbot\index.js:62:23)
    at Client.emit (events.js:327:22)
    at MessageCreateAction.handle (C:\Users\admin\reportbot\node_modules\discord.js\src\client\actions\MessageCreate.js:31:14)
    at Object.module.exports [as MESSAGE_CREATE] (C:\Users\admin\reportbot\node_modules\discord.js\src\client\websocket\handlers\MESSAGE_CREATE.js:4:32)
    at WebSocketManager.handlePacket (C:\Users\admin\reportbot\node_modules\discord.js\src\client\websocket\WebSocketManager.js:384:31)
    at WebSocketShard.onPacket (C:\Users\admin\reportbot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:444:22)
    at WebSocketShard.onMessage (C:\Users\admin\reportbot\node_modules\discord.js\src\client\websocket\WebSocketShard.js:301:10)
    at WebSocket.onMessage (C:\Users\admin\reportbot\node_modules\ws\lib\event-target.js:125:16)
    at WebSocket.emit (events.js:315:20)
    at Receiver.receiverOnMessage (C:\Users\admin\reportbot\node_modules\ws\lib\websocket.js:797:20)```
#

thats error

#

I got

#

@opal plank

obtuse niche
opal plank
#

bingo

#

did you import MessageEmbed?

white vapor
#

Discord.MessageEmbed()

autumn aspen
#

oh ok

opal plank
#

or import MessageEmbed directly

#

{ MessageEmbed }

#

usually you'd only use Client and MessageEmbed

#

might be worthwhile loading those 2

#

if it gets bigger than 3 i usually just require the whole thing

#

also also

drifting wedge
#

can any1 pls help!
client = commands.Bot(command_prefix=commands.when_mentioned_or(f'{prefix}'))
does this work?
no errors
but the prefix var doesnt work
is the _or valid?
d.py

wispy fiber
#

hi

#

i make

#

a music bot

opal plank
#

@wispy fiber which language? which library?

autumn aspen
#

Discord.MessageEmbed()
@white vapor wrong

white vapor
#

that worked for me so

autumn aspen
#

that worked for me so
@white vapor what was ur command

#

with it

white vapor
#
            const embed = new Discord.MessageEmbed()
            .setColor(0xFF9EC2)
            .setThumbnail(message.author.displayAvatarURL())
            .addField('You are:', message.author.username)
            .addField('Requested in', message.guild.name);
            message.channel.send(embed)
            break;```
opal plank
#

@white vapor you shouldnt try to help without knowing what you on about

#

its not a 'it works for me'

#

it depends on his variables

#

what he's importing

#

@autumn aspen show me the top of your file

autumn aspen
#

ok wai

#

t

white vapor
gentle jolt
#

@versed thorn play pornhub intro 1 hour

silver lintel
#

o_o

opal plank
#

took him 10 minutes to take a screenshot of the top of his code

faint prism
#

that worked for me so
@white vapor you're right. It's within Discord.js. So as long as they require it with Discord as their variable name, that'll work

opal plank
#

for all you know they coudl've called Erwin the variable that requires/imports discord

#

¯_(ツ)_/¯

faint prism
#

Tfw function name is $

drifting wedge
#

whats the prefix code for dpy?

earnest phoenix
#

I need help

#

when I use a embed command

#

like with a embed reply it gives this error

opal plank
#

lang?

#

error?

#

lib?

#

info?

earnest phoenix
#
[2020-09-24 21:34:29] [COMMAND] /home/runner/Discord-Bot-List/src/bot/commands/Utility/feature.js
[2020-09-24 21:34:29] TypeError: fields.flat is not a function
[2020-09-24 21:34:29]     at Function.normalizeFields (/home/runner/Discord-Bot-List/node_modules/discord.js/src/structures/MessageEmbed.js:443:8)
[2020-09-24 21:34:29]     at MessageEmbed.addFields (/home/runner/Discord-Bot-List/node_modules/discord.js/src/structures/MessageEmbed.js:259:42)
[2020-09-24 21:34:29]     at module.exports.run (/home/runner/Discord-Bot-List/src/bot/commands/Utility/feature.js:33:3)
[2020-09-24 21:34:29]     at process._tickCallback (internal/process/next_tick.js:68:7)
#

javascript

#

error

#

lib?

#

or well node.js

#

not javascript

opal plank
#

hmmm looks like an outdated file

#

either discord.js or node

#

try updating both

earnest phoenix
#

okay

#

not the case

opal plank
#

then check if you have a function called fields.flat

earnest phoenix
#

I dont

opal plank
#

in feature.js

earnest phoenix
#

thats in node

opal plank
#

of course its in node

earnest phoenix
#

is the node modles

opal plank
#

/home/runner/Discord-Bot-List/src/bot/commands/Utility/feature.js

#

where did THIS come from?

#

oh my bad

umbral zealot
#

NodeJS version 12 is necessary for discord.js v12

#

update node.

opal plank
#

yeah thats what i said, update node

earnest phoenix
#

Thats the command and it dont have fields.flat

opal plank
#

they said they have

umbral zealot
#

the discord.js library has array.flat, and it requires node 12.

opal plank
#

hmmm looks like an outdated file
either discord.js or node
try updating both

earnest phoenix
#

I did update both

#

thats the thing

opal plank
#

okay
not the case

umbral zealot
#

Clearly you didn't install node 12, then. or the bot isn't running on that version. 100% that is the problem.

opal plank
#

thats same that i assumed

earnest phoenix
#

let me try something

wanton nova
#

question about translation, if i'm going to translate the text in the bot, should i translate command names too, or should i leave those the same?

#

because stuff can get messy with accents and different types of spelling

vernal rivet
#

I would leave those the same. Tbh having it be one way is easier than having multiple versions of the command name

wanton nova
#

yeah

#

and spaces in the command name could possibly screw up arguments

#

thank you 👍

vernal rivet
#

Np

drifting wedge
#

can my bots prefix be a var or a mention @bot?

#

if so how?

umbral zealot
#

Yes, the prefix would be <@botid> or <@!botid>

#

(a good regex where the ! is optional would work fine)

opal plank
#

not sure if py regexes are the same

#

though ry n.tag regex in #commands @drifting wedge

drifting wedge
#

also

#

i think i messaged something up

#

this isnt working but no errors

#
client = commands.Bot(command_prefix = f"{prefix}" or f"@742831363358589028")```
umbral zealot
#

It's <@id> not just @id

opal plank
#

also !

umbral zealot
#

yeah but the ! is optional - it will only appear if the bot has a nickname

opal plank
#

check the command i said in testing 0exe

#

if the bot has a nickname it wont trigger

#

cuz it has a ! in it

#

he's perfect matching

#

'!a' =/= 'a'

earnest phoenix
#

it's my node version

drifting wedge
#

also, how can i make the bot send something on mention?

#

phseudo code

earnest phoenix
#

but I can't update because I'm using repl

umbral zealot
#

you can define the version in the package.json in the "engine" section

earnest phoenix
#

wont work

umbral zealot
#

it should

earnest phoenix
#

repl.it has to update it globally, across all users

#
"engines": {
        "node": "12.x"
    },```
#

but it won't update

umbral zealot
#

I dunno my repl have definitely been on 12.x when I created new ones so it's something that can be fixed.

jade pewter
#

how do I enable my bot

jade pewter
#

i did the code

#

just how to run code

umbral zealot
#

depends on the language

jade pewter
#

English

umbral zealot
#

... the programming language you muffin.

jade pewter
#

yeah english

earnest phoenix
#

it's a troll

umbral zealot
#

This is not a shitposting channel.

jade pewter
#

no

#

im new

#

to coding

umbral zealot
#

If you don't even know what programming language you're using, we're gonna have a lot of fun.

jade pewter
#

wait let me try to look it up

#

C

earnest phoenix
#

what is the file extension? .txt .py .js .go ?

jade pewter
#

cpp

umbral zealot
#

what library are you using? sleepy-discord?

#

aegis?

jade pewter
#

yes

#

sleepy

#

discord

earnest phoenix
#

lol

#

faceplanting straight into cpp

drifting wedge
#

Lol

earnest phoenix
#

good luck with that

drifting wedge
#

What’s cpp

earnest phoenix
#

c++

drifting wedge
#

Oooh

#

Yo guys

#

Imma Make a lib called discord.pp

#

Python lib

umbral zealot
#

yeah I honestly have no idea how to run a cpp program

earnest phoenix
#

it's a lowlevel language

drifting wedge
#

Then when ppl need support, I’ll ban them for cursing

#

yeah I honestly have no idea how to run a cpp program
@umbral zealot ur a bot dev

#

U know how to code

#

Oh

#

Wrong person

umbral zealot
#

I'm not a C++ dev and I've literally never run a C++ program or written one or looked up a tutorial.

drifting wedge
#

My bad

earnest phoenix
#

c++ is not beginner friendly in the slightest, people have around 4 years of education just to master it lol

shrewd glen
#

im still waiting for my bot to be aproved

jade pewter
#

class MyClientClass : public SleepyDiscord::DiscordClient {
private:
void onReady() {
SleepyDiscord::Message message = client.sendMessage("#general", "pong");
std::cout << message.content;
}
}

int main() {
MyClientClass client("NzU4ODE4MzUwMDEyMTcwMjQx.X20eqA.skfLg1iabqL9-mRUF-dmqBXAyMM");
}

umbral zealot
#

yeah you're gonna still wait for a while, Freddy. 6+ weeks of waiting

shrewd glen
#

yup

umbral zealot
#

@jade pewter first off, reset your token, because that's your bot's password,

jade pewter
#

oh

#

ok

umbral zealot
#

Second, we have no idea how to run C++ code.

#

If you don't either, maybe you should choose a language that's not so hard to use

jade pewter
#

ok

shrewd glen
#

yeah you're gonna still wait for a while, Freddy. 6+ weeks of waiting
@umbral zealot ive added my friends server and that gets added as soon as you add the server

jade pewter
#

what is beginner friendly

umbral zealot
#

javascript and python are

jade pewter
#

ok I do java script

#

brb

gritty bolt
#

ok I do java script
@jade pewter look up tutorials for discord.js or eris

jade pewter
#

ok

umbral zealot
#

well, I mean, javascript first, then bots.

gritty bolt
#

oh well yeah that too

#

discord.js is the library i'd recommend you look into after you get your bearings with javascript

#

it's much easier than C++

jade pewter
#

ok

gritty bolt
#

python and discord.py are also options but I personally use javascript so I'm more biased towards it

#

theres lots of discord.js tutorials for when you get there too so I'd just go with that

topaz fjord
#

it's up to you for which language you want

#

just make sure you actually learn it

#

before you start

jade pewter
#

ok thanks

gritty bolt
#

yeah

sudden geyser
#

c++ is not beginner friendly in the slightest, people have around 4 years of education just to master it lol
even master is probably an overstatement

faint prism
#

class MyClientClass : public SleepyDiscord::DiscordClient {
private:
void onReady() {
SleepyDiscord::Message message = client.sendMessage("#general", "pong");
std::cout << message.content;
}
}

int main() {
MyClientClass client("NzU4ODE4MzUwMDEyMTcwMjQx.X20eqA.skfLg1iabqL9-mRUF-dmqBXAyMM");
}
@jade pewter is nobody going to say TOKEN LEAK

#

Come on

#

Better regen your token

jade pewter
#

guys discord dm me

gritty bolt
#

TypeError: Cannot read property 'on' of undefined
I keep getting this when I define by bot in my index.js

module.exports.bot = new discord.Client(({ partials: ['MESSAGE', 'CHANNEL', 'REACTION'] }));```
Then do
```js
const index = require('./index');
const bot = index.bot
bot.on('messageReactionAdd', async (reaction, user) => {```
How do I fix this?
#

this is discord.js btw

jade pewter
#

Hey cool guy,

Safety Jim here! It appears that the token for your bot, cool bot has been posted to the internet. Luckily, our token-scanning gremlins noticed, and have reset your bot’s token - hopefully before anyone could have maliciously used it!

sudden geyser
#

It's in relation to you pasting your bot's token here.

#

Discord will warn you and reset it for you.

jade pewter
#

oh ok

sudden geyser
#

You shouldn't give it out publicly because it's like a password.

faint prism
#

Wow that's cool

sudden geyser
#

It's been a thing for a while.

faint prism
#

Never seen that before

slender thistle
#

So is it a Discord thing or just a bot here posts Gists with bot tokens

gritty bolt
#

discord

#

can someone help me with that please

drifting wedge
#

what options do i have to make pinging the bot a prefix?

indigo flax
#

how do u use eval to change the server icon

slender thistle
#

I'm about as far as I can get within my own mind

thick gull
#

how do u use eval to change the server icon
@indigo flax what lib

slender thistle
#

what options do i have to make pinging the bot a prefix?
commands.when_mentioned_or

#

literally what you used sometime ago

modest smelt
#

hey guys i have a question

#
@client.command()
async def help(ctx, prefix, type_help = "None", page:int = 1):
  author = ctx.message.author
  if type_help == "None":
    embed = discord.Embed(title = "Help Command", value = "Welcome to the Help Command. Look at the various categories the bot has to offer! If there is a <> it is optional! Also if there is a [], that is required. This bot is made by ! bobthefam#6969", color=discord.Colour.blue())
    embed.add_field(name = f"``{prefix}polls``", value = "", inline = False)
  else:
    embed = discord.Embed(title = "Oops", description = "I think you may have misspelled something. Try again")
            
  await ctx.channel.send(author, embed = embed)
```For some reason when I run this, it says that ```Ignoring exception in command help:
Traceback (most recent call last):
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/bot.py", line 903, in invoke
    await ctx.command.invoke(ctx)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 847, in invoke
    await self.prepare(ctx)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 784, in prepare
    await self._parse_arguments(ctx)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 690, in _parse_arguments
    transformed = await self.transform(ctx, param)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/discord/ext/commands/core.py", line 535, in transform
    raise MissingRequiredArgument(param)
discord.ext.commands.errors.MissingRequiredArgument: prefix is a required argument that is missing.```
#

do you know why?

slender thistle
#

eh

#

Why

#

Why is the prefix there

modest smelt
#

wdym

slender thistle
#

as a custom arg

modest smelt
#

so where should i put it?

#

it is something the user defines

#

bc of customizable prefixes

slender thistle
#

Question is: should you?

#

...???

modest smelt
#

i think i do

slender thistle
#

Customizable prefixes should be done in a different way where you simply get it from something like a dictionary

#

That way they would make far more sense

modest smelt
#

i store them in json

slender thistle
#

How do you store them exactly

#

What's the key and what's the value

modest smelt
jade pewter
#

visual studio code crash when I do command

modest smelt
#

prefixes[str(ctx.guild.id)]= prefix

slender thistle
#

Alright

modest smelt
#

yes

#

should i do global prefix after that?

slender thistle
#

Attach that dictionary to your bot object under some special property

modest smelt
#

wdym?

#

im not sure what u mean by that

slender thistle
#

bot.prefixes = prefixes

modest smelt
#

client.prefixes = prefixes?

#

what would that do?

slender thistle
#

Or just straight up bot.prefixes[...] = ...

#

Attach the prefixes dictionary to your bot object

modest smelt
#

bot.prefixes[...] = ... what would go in there?

slender thistle
#

so that you could do self/ctx.bot.prefixes[str(ctx.guild.id)] from anywhere (wherever you have access to the bot object)

#

wdym

#

Apply the similar logic as your code

#

Just prepend bot. there

modest smelt
#

so im saying what is x and y in this case: client.prefixes[x] = y

slender thistle
#

So prefixes would become bot.prefixes

#

Have you read your code

modest smelt
#

yes

slender thistle
#

prefixes[str(ctx.guild.id)]= prefix
Does this make sense to you

modest smelt
#

yes

#

oh i see

slender thistle
#

so

#

ey there we go

modest smelt
#

so just do client.prefixes[str(ctx.guild.id)] = prefix?

slender thistle
#

Aye

modest smelt
#

thanks

slender thistle
#

And make sure you use client.prefixes everywhere

modest smelt
#

so then i don't have to put prefix in custom arg?

#

ok

slender thistle
#

Correct

modest smelt
#

ok

jade pewter
#

visual studio code crash when I do command
how to fix?

slender thistle
#

You'd then just do prefix = self.client.prefixes.get(str(ctx.guild.id), ""in case custom prefix wasn't found for the server, this will be used instead")

indigo flax
#

@thick gull any

#

py or js

thick gull
#

edit the icon data

earnest phoenix
#

screams in eris

#
const Eris = require('eris');
 
const bot = new Eris(process.env.DISCORD_BOT_TOKEN);  
 
bot.on('ready', () => {                                
    console.log('Ready!');                             
});
 
bot.on('messageCreate', (msg) => {                    
    if(msg.content.includes(Scream)) {                 
        bot.createMessage(msg.channel.id, 'AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH');  
    }
});
 
bot.connect();
thick gull
#

what

#

ok

ionic dawn
#

any1 here have nice knowledges of gif-encoder-2 and canvas?

dense nest
#

Lol

drifting wedge
#

@slender thistle does this work?

#

client = commands.Bot(command_prefix = commands.when_mentioned_or prefix)

#

it just no errors

#

but the actual prefix var doesnt work

faint prism
#

Well I found out that this is blocking my command from running

#

context.Guild.DownloadUsersAsync().Wait();
Tbh, I probably shouldn't have that inside the cmd...

#

How can I check if my cache for the users in a guild is outdated?

#

hmm maybe this

if (!context.Guild.IsSynced)
  context.Guild.DownloadUsersAsync().Wait();
modest crane
#

why not use DiscordSocketConfig.AlwaysDownloadUsers?

upper elm
#

How can I check if the author of a message has the highest role in a server?

opal plank
#

get server role list.
get highest.
get member highest.
compare.
profit??
@upper elm

upper elm
#

alr, thanks here's a cookie (>^-^)>🍪

opal plank
#

js is fun sometimes

#

objects can be referenced but not values

#

yeet just cut 100+ lines from this

silver lintel
#
var emoji1, emoji2, emoji3, emoji4;

      reactCollector.on("collect", async (reaction, user) => {
        // 'reaction' is the reaction that the user reacted with
        message.channel.send(reaction.emoji.name);
        // 'user' is the user who reacted
      });

how would you set each emoji thing to a variable?

opal plank
#

first off

#

var

#

second off, use array

#

and push()

silver lintel
#

ohh yea

#

ok

faint prism
#

why not use DiscordSocketConfig.AlwaysDownloadUsers?
@modest crane Whoops forgot about that. I'll give it a spin

upper elm
#

hey Not Erwin if you're still here, thanks

opal plank
#

@upper elm ThumbsUp

analog walrus
#

I'm hosting my bot on heroku right now but i want to be able to store data on a json file, I tested my code with from my computer with node but when i uploaded it through github to heroku it wouldn't save anyone

#

is this just a thing with heroku?

sudden geyser
#

omg erwin not attaching images as emojis

#

I think Heroku resets your project files which makes that not possible, at least from what I've heard.

#

I do think it has database support, but the general rule of thumb is free hosting is limited

analog walrus
#

true

#

ive been thinking about switching the hosting service but im too lazy and haven't had any major problems with it so far

#

thanks for the help

opal plank
#

im fairly certain heroku doesnt allow local data

#

apart from whats in your repo

sudden geyser
#

you're killing me notlikenoot

silver lintel
#
var emojiArray = [];

      reactCollector.on("collect", async (reaction, user) => {
        // 'reaction' is the reaction that the user reacted with
        emojiArray.push(reaction.emoji.name);
        // 'user' is the user who reacted
      });
      reactCollector.on("end", async (reaction, reason) => {
        //console.log(emojiArray)
        message.channel.send("emoji react test").then(msg => {
          for (var i = 0; i < emojiArray.length; i++) {
              msg.react(emojiArray[i]);
          }
        })
      });
``` how to make it work with nitro emojis?
sudden geyser
#

The bot needs to be in the server the emoji came from.

#

You'd need to react with the emoji ID (the easiest way to do it).

opal plank
#

@silver lintel stop using var, for the 10th time

#

its 2020 ffs

slender thistle
#

@drifting wedge you know

#

It's a basic Python thing

drifting wedge
#

?

slender thistle
#

If you combined reading the documentation and my advice

drifting wedge
#

Ok

slender thistle
#

You'd get the right answer first time

drifting wedge
#

So......

slender thistle
#

It's a function

drifting wedge
#

Yes, the run code on bot mention?

#

That wut u talking about?

slender thistle
#

You call functions with parentheses

drifting wedge
#

Yes?

slender thistle
#

The code snippet you sent

#

What does it show

drifting wedge
#

Well I’m not on

#

It’s late for me

#

And I gotta sleepies

slender thistle
#

Oh well

#

Call the damn function when you're awake

drifting wedge
#

Tho.... thanks

#

I will lol

#

Cya tmr

earnest phoenix
#

Which template do you guys think I should use for my JSDoc shit

drifting wedge
#

A Minecraft one

#

@earnest phoenix

earnest phoenix
#

ok

#

lemme goggle it and see if there is an already existing minecraft template

midnight blaze
#

@slender thistle where are all the mods going?

earnest phoenix
#

where are all the mods going?
@midnight blaze heaven

midnight blaze
#

and where are all the bot dev going?

#

Hell?

earnest phoenix
#

and where are all the bot dev going?
Hell?
@midnight blaze god punished them for making fucking terrible bots that they think everybody likes but it's just them and their friends because all they did was use BotumGhostum and bots made with it are basically clones of one another
we really need to learn what the word effort means

sudden geyser
#

tbh JSDoc has way too many tags @ with a lot of them doing very minor differences

slender thistle
#

Mods on break because moderating both the website and server is fucking exhausting

midnight blaze
#

@earnest phoenix boats are a sin

#

@slender thistle I see :>

earnest phoenix
#

Mods on break because moderating both the website and server is fucking exhausting
@slender thistle *just website we have minimods for the server mmLol

midnight blaze
#

you guys should let people with bot dev mod rights mmLol

#

imagine the chaos

thick gull
#

is there a reason this is undefined

#

if I remove the .id at the very end it is a channel object

slender thistle
#

Uhh

fluid basin
#

filter returns a collection

#

not a channel

earnest phoenix
#

use find maybe

fluid basin
#

if you have the ID that you need to get, use get

hallow mauve
#

-p 23

thick gull
#

filter returns a collection
@fluid basin i am throwing a fit thank you

#

if you have the ID that you need to get, use get
nah ID was an example

#

i need name

silver lintel
#

``reactCollector.on("collect", async (reaction, user) => {
if (reaction.emoji.id === "758896673023590471") {

    }

}``

if the emoji is that id, how can i make the reaction collector stop and go to reactCollector.on("end"?

fluid basin
#

recommended way of getting reactions is awaitReactions

#

unless you have specific need to use a reactioncollector

whole scarab
slender thistle
#

Alright why did you remove {} after dependencies

#

JSON follows a structure of "key", "value" with a comma appended when there's another key-value pair after that

#
{
    "key1": "value1",
    "key2": "value2"
}
#

See the comma?

whole scarab
#

Yes!

slender thistle
#

You add it because there's key2 thing after it

#

If I want to add, say, "key3": "value3", how would I do it?

whole scarab
#

please help me

slender thistle
#

Alright, seems you either ignored my question or didn't get it

whole scarab
#

I mean the problem is fine but only the circle part

slender thistle
#

And I'm trying to help you UNDERSTAND

whole scarab
#

I didn't ignored my question, but I didn't get it at all

slender thistle
#

why you're getting those errors in the first place

whole scarab
#

I don't know

slender thistle
#

What you have there is a JSON file

#

Following the proper JSON structure, you have keys to the left and values to the right

#

Can you show me what one of your keys and what its value are?

whole scarab
#

key is "name", value is "Fluttershy"

slender thistle
#

Nice

#

Now, what I want you to understand is

#
{
    "key1": "value1",
    "key2": "value2"
}

Do you see the comma there?

whole scarab
#

yes

#

my typing didn't appear comma

sweet ruin
#

Hello all. I am trying to code a command that allows server managers to set roles that are awarded when a member reaches or is above a certain level. I have made the command part of it. but I don't know how to make it so server managers can add multiple role rewards for multiple levels in one command. how do I do this?

These are currently what I have :

So this is my levelrewards model for mongodb : https://paste.mod.gg/gehoceyodu.js

slender thistle
#

@whole scarab so. The comma indicates that there's another key-value pair after the comma

whole scarab
#

{
"key1": "value1",
"key2": "value2"
}

#

@slender thistle, that didn't solve the problem at all

earnest phoenix
#

On authentication , i use bearer token but only when userlogin . but i get rate limited . ratelimit is per account . can anyone tell me reason for it? Ping me pls if someone replied

slender thistle
#

I'm giving you a fucking example

#

Not your ready-to-use JSON

#

Following that example and the fact that you're supposed to enter a comma after each value before another key

#

how do you solve your issue

whole scarab
#

{
"key1": "value1",
"key2": "value2"
}
@slender thistle, that didn't solve the problem at all!😢😭