#development

1 messages · Page 1130 of 1

golden condor
#

You are getting that page essentially

#

And your code can do the same thing

earnest phoenix
#

Yes

#

Mhm.

golden condor
#

But it's not very good at parsing html and stuff, only stuff presented that it likes, like JSON. But you can parse html with cheerio

earnest phoenix
#

so how would i do it

#

lmfao

lusty lintel
#

?!

earnest phoenix
#

no

golden condor
#

You can install a package

earnest phoenix
#

Can you show me how

golden condor
#

Like node-fetch, axios or others

earnest phoenix
#

@golden condor yo whats axios?

golden condor
#

npm i node-fetch

earnest phoenix
#

npm install axios --save

#

Never heard of it

golden condor
#

Yes

earnest phoenix
#

ok

golden condor
#

Axios is better imo

earnest phoenix
#

and then what

thick gull
#

so I need to learn and rermber all of this
@lusty lintel you don’t need to remember it all

#

the guide is there to help you learn it

earnest phoenix
#

I need details on dm.

thick gull
#

and apply it

golden condor
#

You require it and use it in your code

lusty lintel
#

hmmmm ok

earnest phoenix
#

can you show

#

a example

#

On hows it better

thick gull
#

if you want to learn money you use that

#

etc

earnest phoenix
#

@earnest phoenix You have basic knowledge of NodeJS

#

i need to have dinner

#

sorry

#

someone ping me on it

#

for an answer

#

/;

lusty lintel
#

@earnest phoenix You have basic knowledge of NodeJS
@earnest phoenix wdym

#

so this all basic

fierce arch
#

hey is it possible for me to use the top.gg api on my website to display a total server count for my bot?

lusty lintel
#

what the fuck

earnest phoenix
#

@fierce arch it is possible

fierce arch
#

how

earnest phoenix
#

By sending get request ofcourse

golden condor
#

@fierce arch yes you just need to post to the api

thick gull
#

@lusty lintel he is talking to someone else but yes it is basic

earnest phoenix
#

But one downside iz that you cant hife your discord token

thick gull
#

everyone starts from somewhere

lusty lintel
#

bruh then wher is advan

golden condor
#

No you post, not get lol

thick gull
#

advan?

earnest phoenix
#

Its gey

lusty lintel
#

advanced discord.js

earnest phoenix
#

Hey

#

Get

fierce arch
#

I have my bot posting its server count to top.gg just have no clue how to display server count

earnest phoenix
#

Wdym

golden condor
#

That should show it

earnest phoenix
#

Oh wait i know

thick gull
#

you just read the docs and apply what you know/have from the guide or other source

earnest phoenix
#

@fierce arch you use image

golden condor
#

o

earnest phoenix
#

Lemme see

fierce arch
#

@earnest phoenix the image widget?

golden condor
#

You can try use dblapi.js

earnest phoenix
#

Yah

golden condor
#

If you don't already

fierce arch
#

Using py callum

earnest phoenix
#

Yoy want the server count on website?

golden condor
#

o

fierce arch
#

@earnest phoenix yes

golden condor
#

Then dblpy

earnest phoenix
#

Ic

fierce arch
#

my website is html btw

lusty lintel
#

can i put my bot in top/gg

golden condor
#

Widget

#

You can find it inside your bot's edit page

earnest phoenix
golden condor
#

If you edit your bot

fierce arch
#

I already have the widget

golden condor
#

Scroll down

lusty lintel
#

what that

golden condor
#

i

#

o

#

You want to post your server count to the Ali?

#

*api

floral creek
#

maded the hacking command xd

thick gull
#

can i put my bot in top/gg
@lusty lintel if it is online and approved when testing

#

which will be in 3+ weeks

#

once you add

lusty lintel
#

bruh it do test then nvm

golden condor
lusty lintel
#

my bot have 2command

#

ban and kick

#

:)

thick gull
#

ohok

golden condor
fierce arch
#

yh

lusty lintel
#

hwo you guys get bot dev in this server

golden condor
#

Try the above ^^^

thick gull
#

The bot is on topGG

fierce arch
#

but you see i dont want the widget just the server count

golden condor
#

ohhhh

#

I see

fierce arch
#

@lusty lintel Code a bot and submit it and then you get the role

earnest phoenix
#

@fierce arch ah

#

Lemme see

fierce arch
#

Yeah

lusty lintel
#

oh

fierce arch
#

I'm good with the widget

golden condor
#

Lemme see if you can do that, I don't think just server count but lemme check

earnest phoenix
#

so

#

a fixx?

ancient falcon
#

true programmers use the api instead of a lib

golden condor
#

You want your bots server count on your widget ?

fierce arch
#

No

delicate shore
#

What's the best and cheapest VPS but windows oje

golden condor
#

@ancient falcon I do that lol

delicate shore
#

One*

#

Not Linux

golden condor
#

Smfh

earnest phoenix
#

He want pure integer server count

golden condor
#

o

ancient falcon
#

@golden condor that was a joke please keep your sanity

fierce arch
#

I have a section on my website and i just want it to display in text the number of servers the bot is in

golden condor
#

I use the api

lusty lintel
#

can someobne explain what does mongodb do

golden condor
#

You can use an API to your bot?

#

Make a small api

#

Like

#

That send the server count of your bkt

#

And then fetch it

#

And put it in the site

fierce arch
#

@lusty lintel It is basically just json but as a db so wont go courpt

earnest phoenix
#

@lusty lintel its an databasr

#

But json

#

Get it

fierce arch
#

Okay @golden condor

golden condor
#

U can use flask I guess

earnest phoenix
#

give a fix

#

simple

ancient falcon
#

nah use aiohttp

#

aiohttp ftw

golden condor
#

@ancient falcon they asked for a reason

#

Idk python libs

earnest phoenix
#

@earnest phoenix google http get request example nodejs

#

callumm

ancient falcon
#

oh yeah you're 100% right nvm

#

that was a stupid thing to say

#

I take it back

earnest phoenix
#

pleas

golden condor
#

Blxuu

earnest phoenix
#

yh

golden condor
#

What is the problem

earnest phoenix
#

so

#

i need to check guilds

#

and a mod sent me this

golden condor
#

mk

golden condor
#

You want to check it inside your bot?

earnest phoenix
#

yes

#

or put it in a pastebin

golden condor
#

No no no you don't need that

earnest phoenix
#

just to check

#

owners

#

and names

#

and all of the guilds

golden condor
#

What library do you use?

ancient falcon
#

you have to be authenticated with the gateway for this though don't you

earnest phoenix
#

node.js

golden condor
#

For discord

#

Discord.js?

viral iris
#

how to get memory useage ?

earnest phoenix
#

yea

golden condor
#

process.memoryUsage()

ancient falcon
#

node.js isn't a lib

viral iris
#

not working

earnest phoenix
#

where would i put that callum

#

i mean

golden condor
#

Not to you

earnest phoenix
#

oh

golden condor
#

That's to John

viral iris
golden condor
#

So

viral iris
golden condor
#

If you use v12 you can do this

viral iris
#

i mean

golden condor
#
client.guilds.cache.map(guild => //stuff here 
)```
viral iris
#

if the memory 100
says 50/100

#

like this

earnest phoenix
#

i need the actual code

ancient falcon
#

use mathematics

earnest phoenix
#

not map here

#

please

golden condor
#

Someone please help me

lusty quest
#

you need to convert the output to a readable number @viral iris

viral iris
#

use mathematics
@ancient falcon ?

golden condor
#

I'm getting a headache genuinely

lusty quest
#

/1024/1024

viral iris
#

you need to convert the output to a readable number @viral iris
@lusty quest don't get it

#

oh

#
process.memoryUsage().heapUsed / 1024 / 1024;
obtuse charm
golden condor
#

My head hurts

viral iris
#
Evaluated
58.76145935058594
lusty quest
#

Floor it to get rid of the excessive numbers

golden condor
#

@viral iris that's how much memory your not is using

obtuse charm
golden condor
#

you can use Math.round

floral creek
#

how was it the reaction add? for a especific emoji=

#

?

golden condor
#

To round it to a whole number

earnest phoenix
#

use :emojiname:

#

i mean

fierce arch
#

Thanks sorted it as i remembered that the edit page allows you to get a widget size small of just your server count

viral iris
#

process.memoryUsage().Math.round/ 1024 / 1024;

earnest phoenix
#

\ :emoji:

golden condor
#

ok

floral creek
#

so like

ancient falcon
earnest phoenix
#

yes

#

you get that

floral creek
#

if reaction == "emoji": ?

earnest phoenix
#

bRuh

viral iris
#
process.memoryUsage().Math.round/ 1024 / 1024;

lusty quest
#

@viral iris did you know basic js?

viral iris
#
Evaluated
TypeError: Cannot read property 'round' of undefined
floral creek
#

round()

golden condor
#

I need to go lie down

ancient falcon
#

if you want to use waveDoggo you do"![waveDoggo](https://cdn.discordapp.com/emojis/647529698720743454.webp?size=128 "waveDoggo")"

nimble kiln
#

Math.round(process.memoryUsage().heapUsed / 1024 / 1024)

#

There u go

viral iris
#

ok

#
Evaluated
61
#

61/250 ?

nimble kiln
#

no idea what you want to do, just fixed your line of code

lusty quest
#

how much ram did your VPS got?

viral iris
#

how much ram did your VPS got?
@lusty quest 250

floral creek
#

a got it


 if reaction.emoji == '👍':

lusty lintel
#

what

ancient falcon
#

what lib is that

floral creek
#

py

lusty quest
#

then its 61/250

ancient falcon
#

yep like that

#

for more information about that emoji attribute

exotic prism
#

since my bot doesn't use much memory, should I lower the limit and pay less money for the hosting?

lusty lintel
#

I take rest from bots now play mineecrfat

#

yaaaaaaaaaaaaaaaa

exotic prism
#

ok ty

#

ill wait for my plan to expire

lusty lintel
#

wait amin

#

you pay m,oney?

#

for bots

#

what teh fuck

honest perch
#

Huh

exotic prism
#

what

#

isn't that common?

#

i cant find a free and reliable bot hosting so

lusty lintel
#

no does I need to put my bot in top/gg pay money for put?

honest perch
#

No

exotic prism
#

no

honest perch
#

But you need to host it somewhere

exotic prism
#

i've used glitch before but it doesn't work now

oak cliff
#

@exotic prism if you want to pay less go for it, but if you're comfortable paying what you're paying you can keep the same vps for when your growth necessitates more ram

#

That's just my two cents

exotic prism
#

I mean glitch banned discord

#

i think

oak cliff
#

They banned uptime robot

exotic prism
#

yeah

#

the plan i pay for is 0.88/mo

oak cliff
#

That doesn't seem bad at all

exotic prism
#

so if i pay 512MB i would pay 0.44/mo

oak cliff
#

Then it's up to you really

exotic prism
#

its a ticket bot which i added 30min ago

mild flower
#
              try {
                   message.reply(evaluate(message.content.substring(`${PREFIX}math `.length)));
             } catch (err){
                message.reply("sorry no algebra for security reasons");
               };```

This is still getting me a throw.err and crashing the bot. How do i prevent that and send a message everytime a  throw.err activates due to this
wanton anvil
#

How many bots can I run in glitch at a time??

#

i guess no @mild flower

#

I'm currently running three bots they are running absolutely finr but my If my fourth bot enter it is turning off a bot @mild flower

mild flower
#

bruh y u ping so much

earnest phoenix
#

what value should i use in image:{} inside an embed object to change the size of the image?

mild flower
#

@earnest phoenix i got rid of the variables and just copy pasted the try code but still not working?

earnest phoenix
#

then

#

maybe i did smth wrong

mild flower
#

bruh

#
evaluate(message.content.substring(`${PREFIX}math `.length)).catch(err => {
                message.channel.send('NO')
            })```
this work?
#

no it doesnt

#

it crashes as soon as it evaluates the equation

earnest phoenix
#

Hello, how do we know the number of servers in which and our bot (in the status) please

mild flower
#

bot.guilds.cache.size @earnest phoenix

earnest phoenix
#

thank you but I my where?

mild flower
#

hm

honest perch
#

Learn js

mild flower
#

in the client.ready

honest perch
#

And read the docs

earnest phoenix
#

thank you ^^

mild flower
#

how do i see if a variable has letters in it or not

#

i dont want to type every lettre in includes()

pale vessel
#

"abcdefghi...z".split("").some(x => text.includes(x));

#

that's really bad

#

don't do that lmao

earnest phoenix
#

@mild flower I have a TypeError: client.guilds.cache.size is not a function

mild flower
#

if(var.includes("abcdefghijklmnopqrstuvwxyzz".split("").some(x => text.includes(x))))

#

@mild flower I have a TypeError: client.guilds.cache.size is not a function
@earnest phoenix replace client with bot

earnest phoenix
#

ok

pale vessel
#

that or regex (if (string.match(/[a-zA-Z]/)))

timid notch
#

!p nhạc đám ma

#

c!play nhạc đám ma

sinful belfry
#

-botcommands @timid notch

gilded plankBOT
#

@timid notch

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

mild flower
#

hmm

#

doesnt seem to be working?

earnest phoenix
#

@mild flower I cannot put "bot" me because who replaces bot at home is "client"

wary flame
#

you're error is because .size is not a function

#

@earnest phoenix ^, you should just do client.guilds.cache.size, without "()" after ".size"

earnest phoenix
#

ok thank you I test and I repeat

#

@wary flame hum low I don't know if it works because there is nothing that changes on the profile of my bot but on the other hand I have no error

wary flame
#

What are you trying to use it for? Server count in status?

floral creek
#

-botcommands 730124969132163093

wary flame
earnest phoenix
#

?

#

@wary flame why do i want her?

wary flame
#

Could you please use an understandable sentence

exotic prism
earnest phoenix
#

sorry i use google translate x)

exotic prism
#

im making eval so im making sure i dont fk up

earnest phoenix
#

@wary flame drop thanks anyway

wary flame
#

@exotic prism if thats your userID code within the if statement will only be executed if you send the message

exotic prism
#

ok

#

i know

#

but is the check correct

pure lion
#

SUUUUUUUUUP so I'm trying to make an auth thing

exotic prism
#

like am i supposed to put <id> or id

pure lion
#

But it can't parse the body of a req

wary flame
#

The check is correct

earnest phoenix
#

try it and see

pure lion
#

aEe

earnest phoenix
#

mobile :(

pure lion
#

Fair

rustic nova
#

Ayyy i still remember the url GWkyooHappyDay

pure lion
#

So yeah anyone know how to help me

#

I'm doing app.use(express.json)

wary flame
#

Yes?

pure lion
#

But it's returning undefined

#

Also using postman to test*

wary flame
#

express.json is a function, if you want to use it you need to do "express.json()"

earnest phoenix
#

Hi anyone selling good bot codes lol I’m buying

pure lion
#

Oh fuck it turned hello why didn't I see

#

@earnest phoenix meeeeee

earnest phoenix
#

Dm me

#

:3

pure lion
#

@wary flame still returns undefined

wary flame
#

Does app.use return anything?

pure lion
#

Log it or what

rustic nova
#

Hi anyone selling good bot codes lol I’m buying
@earnest phoenix yes, dm me for resources that can help you with programming. And guess what? IT'S FREE

earnest phoenix
#

I mean

pure lion
#

No ssssshhhhh I need nitro money

earnest phoenix
#

I just need good codes lol

#

Not those free ones

#

¯_(ツ)_/¯

mild flower
#

WHy isnt my try catch code not preventing throw.err

pure lion
#

The error originated from outside it

mild flower
#

no it didnt

#

i triple checked

pure lion
#

Put a breakpoint

mild flower
#

ok a code after the try was messing with it

#

but how do i make it so that it stops at the catch and doesnt execute code beyond that

#

thats my main problem

pure lion
#

Return

#

I think

mild flower
#

?

#

return where

#

at the catch?

wary flame
#

@pure lion if I look trough the docs app.use doesnt seem to return anything (as I thought), but that snippet will enable express.json for your server

mild flower
#

or add an if statement to the try

#

*inside

pure lion
#

Can you link the snippet?

wary flame
#

I meant this

app.use(express.json())
pure lion
#

Ye I'm doing that

wary flame
#

And i can link the docs if you want wait a sec

rustic nova
#

I just need good codes lol
@earnest phoenix code it yourself then, or hire people on freelancer or fiverr to code for you

mild flower
#

YES

#

IT WORKED AFTER 2 DAYS OF BRAIN CANCER

earnest phoenix
#

Me lazy

feral aspen
#

What is the minimum setinterval() seconds for changing statuses in bots? Is it 60?

mild flower
#

@pure lion thanks the return fixed it

wary flame
#

What is the minimum setinterval() seconds for changing statuses in bots? Is it 60?
@feral aspen There are no clear rate limits, generally you should not automate the api

rustic nova
feral aspen
#

In #mod-logs , one reason was your status changes too quickly

wary flame
#

But I think you will be fine with 60 seconds, but youre responsible

rustic nova
#

refer to the gateway docs for ratelimiting

pure lion
#

It's not woRking

#
router.post('/register', async (req, res) => {
    console.log(req.body)
    const User = new UserModel({
        userID: userID(),
        name: req.body.name,
        email: req.body.email,
        password: req.body.password
    });
    try {
        const savedUser = await User.save()
        res.send(savedUser)
    } catch (e) {
        res.status(400)
        return console.error(e)
    }
});
baccend^```
```json
{
    "name": "1111111111111",
    "email": "bsbsbsbs@h.com",
    "password": "123456789"
}
body from postman^```
#
undefined
log body^```
#
app.use(express.json())
app.use(express.urlencoded({extended:true}))
yes^
pale vessel
#

what's the problem

wary flame
#

Express.json doesnt seem to be working

pure lion
#

^this

earnest phoenix
#

Is there a way to run a python file using Node.JS, if so, how does one do it?

pure lion
wary flame
#

Did you restart your server after updating the code?

#

@pure lion

pure lion
#

yeah

#

im using nodemon

wary flame
#

Hmm

pure lion
#

confusing :/

wary flame
#

Try bodyparser?

#

Should make no difference but who knows

pure lion
#

okay weird

earnest phoenix
#

Anyone got good or fun bot codes I’m buying lol

pure lion
#

i tried sending the status as 200 but its still giving me bad req

rustic nova
#

Code them yourself

pure lion
#

HMMMMMMMMMMMMMMMMMMMMMMMMM

earnest phoenix
#

Me lazy

rustic nova
#

Then you in da wrong place my budda GWjianWut

lusty spade
lusty quest
#

mongodb or mongoose or something else?

lusty spade
#

mongoose

delicate shore
#

I came here

#

and

#

I am going

lusty quest
#
Poll.updateOne({"pollmessageid":message.id,"votes.vote":vot},{$inc:{"votes.$.votes":1}});
``` this as example increments a value in the subarray votes in the array votes where vote is a string i define
pure lion
#

I need help

wary flame
#

With? Same problem still?

uneven estuary
#

Yesterday i posted this problem but with a different error
rn im getting a new error that i have no idea how to fix
the error im getting is

if (!value) throw new RangeError('EMBED_FIELD_VALUE');
                ^

RangeError [EMBED_FIELD_VALUE]: MessageEmbed field values may not be empty.

at Client.emit (events.js:310:20) {
  [Symbol(code)]: 'EMBED_FIELD_VALUE'
}```

this is the code https://hastebin.com/ibuvonumav.js
this was my problem 
please @ me if someone answers thank you

> Henloo, so I changed from hosting on glitch to locally hosting my bot but for some reason, even after installing all the packages required, im getting a `MessageEmbed is not defined` error when its a global variable in the file. I tried to use a different command that used embed and it worked. I'm using discord.js v12.
> and I would like to say that i didnt change anything in the code when i started hosting locally. 
> It was working fine on glitch.
real niche
#

Is that the whole stacktrace?

#

Wait I'm sorry, I see that's in your code

#

No nevermind

pure lion
#

With? Same problem still?
Yup but I think it's an issue with postman

uneven estuary
#

nope but i thought it was the most important part
but gimmi a sec i can post it

real niche
#
        .map(category => stripIndent`\n${commands(`info`)}`)
        .reduce((string) => string);```
#

Are you trying to use stripIndent as a function?

#

I'm not really sure what's going on in that line. It doesn't look like correct syntax to me but you should get a different error if it was :/

uneven estuary
#

is not a funtion is more like its mapping it or like getting it from the folder

#

but yeah i should be getting a different error if thats the case

#

it was working fine on glitch

real niche
#

How does it work? variable"string" doesn't seem right.

lusty spade
#

I have tried this to update arrays but i get this error this (is in mongoose)
error:
(node:11268) UnhandledPromiseRejectionWarning: MongoError: Cannot increment with non-numeric argument: {Settings.messagelog: "723134799551922236"}

            await Guild.updateOne(
                {
                    guildID: message.guild.id,
                },
                {
                    $inc: { 'Settings.messagelog': args[0].id },
                },```
tight plinth
#

read error lol

real niche
#

parseInt it

#

Or

tight plinth
#

no

real niche
#

Make it a string column

tight plinth
#

don't store ids as numbers

#

they could break

real niche
#

I don't see how they would break but parseInt-ing then toString-ing to make it the correct type is inefficient.

uneven estuary
#

How does it work? variable"string" doesn't seem right.
@real niche stripIndent isnt the problem ; its just there to keep indent if theres an indent

#

its from a pack called common-tags

real niche
#

I just don't understand why it doesn't cause an error.

tight plinth
#

some dbs convert them to 7.3505588+eX instead of 73055588.....

#

they don't store the full number coz it's too big

#

that's also why discord itself store them as strings

uneven estuary
#

bc its insignificant ; even if stripIndent wasnt there, code would work fine

#

its like it would me output prettier, if that make sense?

real niche
#

Looks like ` strings are given as an array to a function without parenthasis.

#
  console.log(inp);
}
a`t` ```
outputs
``Array [ "t" ]``
earnest phoenix
real niche
rustic nova
#

@earnest phoenix though you need to have a bot on top.gg first

earnest phoenix
#

My bot is approved

#

What next to do

rustic nova
#

Not yet, you don't have the Developer role yet

#

it has to be approved first

earnest phoenix
#

OK

#

What is the next step

#

Please tell

tight plinth
#

get api key

rustic nova
#

Get the api token and read the dbl docs

tight plinth
#

listen to votes with the webhook

#

do stuff

earnest phoenix
#

How

#

?

tight plinth
#

you'll see

quartz kindle
#

your bot is not approved yet, otherwise you'd have a green name

rustic nova
#

but you won't be able to do it until you actually have the bot on top.gg approved

tight plinth
earnest phoenix
#

Thanks

#

Is it acceptable in all api

#

?

#

@tight plinth

tight plinth
#

yep

rustic nova
#

if your Language is not listed there, you'll need to write your own api wrapper for your language

#

But i really assume there's a wrapper for every language

earnest phoenix
#

BDFD api

#

I am using

rustic nova
#

understandable have a great day

delicate shore
#

umm

#

one thing

rustic nova
#

yes?

delicate shore
#

oh i think wrong channel

#

it's api question

tight plinth
lusty spade
#

i want this code to update the value of messagelog to the mentioned channel id but instead of updating it it tries to create a new element why?js await settings.updateOne( { 'Settings.messagelog': args[0].id, }, );

delicate shore
tight plinth
#

k

pine aspen
#

Number is an int right?

#

For mongoose

pure lion
#

Number is a number but it depends how you're interacting

#

So I'm using express to get the body of a post req (I am using express.json() in my app.js, as well as express.uriencoded({extended:true})) but it always logs undefined. Anyone have any ideas?

golden condor
#

body-parser

pure lion
#

Alright

#

That's its own package?

split hazel
#

yes, dont believe body parser is built into express anymore

pure lion
#

Dam :(

honest perch
#

how do i check if a message contains an invite in eris

pale vessel
#

just the same as you would do in discord.js?

honest perch
#

and how do i do that in djs :fingerguns:

exotic prism
#

how do i check if a message contains an invite in eris
@honest perch I use regex patterns

honest perch
#

regex is cursed

exotic prism
#

What and why

honest perch
#

because yes

exotic prism
#

Not invite

pale vessel
#

contains seems better than starts with

exotic prism
#

Yeah

pale vessel
#

but regex would be better

exotic prism
#

My bad

summer torrent
#

yes regex

exotic prism
#

Then check for the length of invite

pale vessel
#

because without regex, there could be false positives

summer torrent
exotic prism
#

@honest perch I use regex patterns
@exotic prism

#

...

#

Don’t u guys see

pure lion
#

It's still not working ;-;

honest perch
#

what do i even do lmao

#

its just a text box

pale vessel
#

fill it in

lusty quest
#

@lusty spade you dont search for the model you update first

honest perch
#

where

summer torrent
#

no

honest perch
#

ive filled it in

summer torrent
pale vessel
#

no, regex expression

#

this isn't a generator

exotic prism
#

r'discord(?:.com|app.com|.gg)[/invite/]?(?:[a-zA-Z0-9-]{2,32})'
@honest perch

honest perch
#

i cant even click that box

summer torrent
#

/(https?:\/\/)?(www\.)?(discord\.(gg|io|me|li)|discordapp\.com\/invite)\/.+[a-z]/g

honest perch
#

i cant even click that box

summer torrent
#

which box

exotic prism
#

Just put it in ur bot

honest perch
#

no

exotic prism
#

Then test

honest perch
#

i want to click the box

summer torrent
#

use this

exotic prism
#

Ok ok

#

First you need a mouse

honest perch
#

no but i cant click the box and its bugging me

exotic prism
#

Then press the left button

honest perch
#

i am

exotic prism
#

If you can’t then go get a good website

honest perch
#

i cant click anywhere

exotic prism
#

Then you prob got a virus installed on ur pc or something

honest perch
#

i have not

exotic prism
#

Then use other browser

pale vessel
#

nmw gave you the expression

earnest phoenix
#

How to make a bot at mobile?

pale vessel
#

use .match or regex.test()

earnest phoenix
#

How?

golden condor
#

@earnest phoenix

#

Can you help Gruja out

earnest phoenix
#

Hmm?

honest perch
#

i cant click it on chrome either

#

ok where tf do i click

exotic prism
#

Then the site is broken

earnest phoenix
#

Why are you guys have verified bot developer badge?

honest perch
#

no because the other guy did it

summer torrent
#

why not

slender thistle
#

-verifybot

gilded plankBOT
#

Hi! It seems like you are looking for information on how to get your bot verified.

Once your bot reaches 75 servers or more, you are eligible for bot verification. On October 7, 2020, bots with 100 servers or more that are not verified will not be able to be invited to any more servers. You verify your bot on your bot's application page, under the "Bot" section in the sidebar.

If you need more information, check out this article written by Discord about The Future of Bots on Discord and you can ask questions in the Discord Developer Server.

We cannot provide support on how to get your bot verified.

earnest phoenix
#

cause we verified our bot

#

Oh

summer torrent
#

^

earnest phoenix
#

And how to make bot at mobile?

honest perch
#

it isnt even a fucking text box

earnest phoenix
#

Welp no one can help me?

exotic prism
#

LOL

golden condor
#

Voltrex can just wait for him

honest perch
#

@summer torrent explain

summer torrent
#

explain what

exotic prism
#

How are you supposed to make a bot in mobile

honest perch
pale vessel
#

misly, uh

golden condor
#

it's possible

pale vessel
#

what do you need on that site

honest perch
#

how you did this

earnest phoenix
#

I made my bot on mobile using glitch

exotic prism
#

Yeah

#

Does require a host

earnest phoenix
#

It’s possible but why would you do it

summer torrent
#

i found that on google weirdsip

exotic prism
#

You can’t host your bot on mobile

golden condor
#

you can.

honest perch
#

yes but how

#

did

earnest phoenix
#

Really??? No one can help me???

honest perch
#

your box have things in it

golden condor
#

You can’t host your bot on mobile
@exotic prism you can

summer torrent
#

🤔

earnest phoenix
#

Welp i guess i have to watch it at YT

summer torrent
#

I just opened that website

honest perch
#

the website is fucking rigged

summer torrent
#

or use your eval command

rustic nova
delicate zephyr
#

@earnest phoenix whats up

summer torrent
pure lion
#
(node:43632) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'name' of undefined```
```js
// Route middlewears
app.use('/api/user', authRoute);
app.use(express.urlencoded({extended:true}));
app.use(bodyParser.json());```
```js
// Register Page
router.post('/register', async (req, res) => {
    console.log(req.body)
    const User = new UserModel({
        userID: userID(),
        name: req.body.name,
        email: req.body.email,
        password: req.body.password
    });
    try {
        const savedUser = await User.save()
        res.send(savedUser)
    } catch (e) {
        res.status(400)
        return console.error(e)
    }
});```
:l
real niche
#

req.body.name

rustic nova
#

name is undefined

honest perch
pure lion
#

yes

real niche
#

the body is undefined

#

Add a null check

pure lion
#
{
    "name": "1111111111111",
    "email": "bsbsbsbs@h.com",
    "password": "123456789"
}```
body
exotic prism
delicate zephyr
#

@pure lion req.body.name doesnt exist

#

and show output

pure lion
#

okay

restive furnace
pure lion
#

well the thing is

real niche
#

No need to show output, it'll just make an error.

pure lion
#

req.body logs as undefined

rustic nova
#

Omg guys look I’m making a discord bot on iPad!
@exotic prism wayyy ahead of ya, my discord bot is made on my fridge

delicate zephyr
#

@pure lion then you need to find out why its logging as undefined

#

I can't see why it would be

exotic prism
#

LOL

restive furnace
#

pedractyl panel i see

pure lion
#

I can't see why it would be
neither can i

#

:d

delicate zephyr
#

Oh wait

#

You have your body parser below the router init

pure lion
#

o

lusty spade
#

@lusty spade you dont search for the model you update first
@lusty quest i did what you told me to do but i still get the same error

(node:1852) UnhandledPromiseRejectionWarning: MongoError: Cannot create field 'messagelog' in element {Settings: [ { modlog: null, serverlog: null, messagelog: null, antilinks: false } ]}

            await Guild.updateOne(
                {
                    guildID:message.guild.id,
                },
                {
                    'Settings.messagelog': args[0].id,
                },
            );```
delicate zephyr
#
// Route middlewears
app.use('/api/user', authRoute);
app.use(express.urlencoded({extended:true}));
app.use(bodyParser.json());

to

// Route middlewears
app.use(express.urlencoded({extended:true}));
app.use(bodyParser.json());
app.use('/api/user', authRoute);

@pure lion

#

code execution is a pain

exotic prism
#

pedractyl panel i see
@restive furnace the host is cheap ok? it’s only $0:88/mo so don’t expect a custom panel

delicate zephyr
#

you'll get the hang of it eventually

unreal solar
#

I don't mean to interrupt, is there a method to add an array or multiple Roles? i think i figured out how to fetch roles by their id but i can't assign multiple roles at once

lusty quest
pale vessel
restive furnace
#

@restive furnace the host is cheap ok? it’s only $0:88/mo so don’t expect a custom panel
yeah, i didnt say its bad

unreal solar
#

ahhh of course

lusty quest
#

@exotic prism the panel is not custom. its a open source Game Management panel that also offers the ability to host Discord bots. in the End you get a Docker Container where your bot is running ing

unreal solar
#

thanks!

pale vessel
restive furnace
#

he said dont expect a custom

delicate zephyr
#

@pure lion lemme know if it works!

exotic prism
#

@exotic prism the panel is not custom. its a open source Game Management panel that also offers the ability to host Discord bots. in the End you get a Docker Container where your bot is running ing
@lusty quest it’s not, it just a pterodactyl panel

lusty quest
#

my bad

#

i know

pure lion
#

it does, thanks luke :)

lusty quest
#

i used it for a few years

exotic prism
#

The word ‘custom’ means something made especially for an object

delicate zephyr
#

no problem

lusty quest
#

but its limiting what you can do within the bot

exotic prism
#

I don’t think

honest perch
#

how would i see if a message contains something in eris

restive furnace
#

same like d.js

summer torrent
#

.includes()

earnest phoenix
#

@delicate zephyr u will help me?

delicate zephyr
#

Whats up

#

what you do need help with

earnest phoenix
#

Make a bot

misty sigil
#

@honest perch <message>.content.includes()

restive furnace
#

message event has not been changed on eris expect the name | not saying its fork lol

earnest phoenix
#

Wait

#

I change my account first

summer torrent
#

@earnest phoenix read this

delicate zephyr
#

just be aware it isnt easy

pale vessel
#

if you use regex, use <expression>.test(message.content) or message.content.match(<expression>) @honest perch

delicate zephyr
#

it will take time to learn

#

@summer torrent just link the actual tutorial

#

instead of a message link

exotic prism
#

Does anyone know what is 1+1? I need it to finish my bot.

restive furnace
#

2

real niche
#

3

summer torrent
exotic prism
#

3
@real niche ok ty

restive furnace
#

wait no, 11

real niche
#

np

restive furnace
#

"1" + "1" = "11"

lusty spade
#

so like this @lusty quest ?

            await Guild.updateOne(
                {
                    guildID:message.guild.id,
                },
                {
                    $set: { 'Settings.messagelog': args[0].id },
                },
            );```
exotic prism
#

Ohhhh

summer torrent
#

what about if it is a number LUL

restive furnace
#

lets say its not

exotic prism
#

Nonono

real niche
#

Just use php and "1" + "1" = 2

exotic prism
#

I mean it’s not a integer

summer torrent
#

11

exotic prism
#

In Java

summer torrent
#

string + string = stringstring

exotic prism
#

yeah

#

Now go learn math noobs

#

@summer torrent is the correct person

summer torrent
restive furnace
#

okhe

summer torrent
#

who is math noob

lusty quest
#

@lusty spade try and see

lusty spade
#

it gives the same error also

jolly wave
#

i need help every command with values in my script are broken

misty sigil
#

yes?

real niche
#

What exactly does that mean?

jolly wave
#

when i try the commands

#

no reply

#

no error

#

idk why

real niche
#

What is the code?

#

Maybe try putting debug lines around where it is called

jolly wave
#

wait

misty sigil
#

Maybe try putting debug lines around where it is called
@real niche this.

#

i had an issue with my command handler

real niche
#

Ok actually I gotta go to bed now gn

jolly wave
#

wait i am making a hastebin

misty sigil
#

and a few debug lines figured it was with the overwrite checking

#

Ok actually I gotta go to bed now gn
@real niche gn

honest perch
#

how would i get a servers name from an invite

jolly wave
#

i can't save the hastebin

pure lion
#

Use my bot

lusty quest
#

@lusty spade is your path correct?

real niche
#

Ok not yet 1 more question @honest perch what language?

jolly wave
#

it don't stop saying something went wrong when i try to save my hastebin

honest perch
#

eris js

real niche
#

umm

pure lion
real niche
#

yeah time for sleep

jolly wave
#

?

lusty spade
#

should be cus the error shows the part

pure lion
#

Oops wrong channel

rustic nova
#

just use pastebin instead if hastebin doesn't work

pure lion
#

X)

lusty spade
#

should be cus the error shows the part
and when i add a $ between settings and messagelog it gives
The positional operator did not find the match needed from the query.

jolly wave
pure lion
#

aa!bin testing 1

lusty quest
#

@lusty spade it says it cant create the element this is why i think your path is maybe wrong

rustic nova
#

for the people who don't want to download the txt

jolly wave
#

oh ty

lusty spade
#

it is correct cus the messagelog is in the path Settings: [ { modlog: null, serverlog: null, messagelog: null, antilinks: false } ]}

pure lion
#

my bot literally has a command for that >:(

misty sigil
#

ok so

jolly wave
#

so anyone can help me

misty sigil
#

can we just use 1 message event

lusty quest
#

your model?

pure lion
#

@lusty spade extr }?

lusty quest
#

schema*

jolly wave
lusty spade
#

that was the error

misty sigil
#

ok so theres

#

quite a lot of errors

pure lion
#

Bruh

honest perch
#

how would i check if a user has a role or not in eris, last question

misty sigil
#

so, one by one.

#

3 message events

#

and if you type yes

#

it restarts the bot

jolly wave
#

on my restart command?

#

yes

misty sigil
#

and every message

#

it will send a profile embed as that if statement doesn't do anything

pure lion
#

Jeremy add index.ts to your node turn to string package

jolly wave
#

wdym

misty sigil
#
  if (msg.content === "?profile")

msg.channel.send(embedProfile);``` this here
jolly wave
#

yes

misty sigil
#

if you were doing this properly it'd be

  if (msg.content === "?profile")msg.channel.send(embedProfile);```
#

but to be more efficient, that builds it every message

lusty spade
#

@lusty quest you mean this?```const mongoose = require('mongoose');

const guildSchema = mongoose.Schema({
_id: mongoose.Schema.Types.ObjectId,
guildID: String,
guildName: String,
prefix: String,
Settings: Array,
});

module.exports = mongoose.model('Guild', guildSchema, 'guilds');```

jolly wave
#

can't understand

misty sigil
#

so it'd be better being js if(msg.content === "?profile"){ const embedProfile = new Discord.MessageEmbed() .setColor('#0099ff') .setTitle(`${msg.author.username}'s Profile`) .setAuthor(`${msg.author.username}'s Profile`) .setDescription(`${msg.author.username}'s User Informations`) .setThumbnail(msg.author.displayAvatarURL()) .addFields( { name: '\u200B', value: '\u200B' }, { name: 'ID:', value: `${msg.author.id}`, inline: true }, ) .setImage(`${msg.author.displayAvatarURL()}`) .setTimestamp() .setFooter(`Every stats of ${msg.author.username}`); msg.channel.send(embedProfile); }

jolly wave
#

ooooh

lusty quest
#

@lusty spade yes

misty sigil
#

and i'd also recommend a command handler

#

or just one message event

jolly wave
#

isn't the script i showed my command handler?

misty sigil
#

Kinda, its more of just elseif spaghetti

jolly wave
#

yes

#

how i saw in the guide

pure lion
#

Spoghetti

misty sigil
#

It'd be better having the owner only commands in the main message event

jolly wave
#

i tried to put it but it didn't worked

misty sigil
#

and using awaitMessages

lusty quest
#

@lusty spade iirc you need to set an array to update the stuff inside the array bcs you havent defined them in your schema

jolly wave
#

can't understand

lusty spade
#

how do i do that?

misty sigil
#
const filter = m => m.content.toLowerCase() === 'yes';
channel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })
  .then(collected => thing you wanna do on collect)
  .catch(collected => msg.channel.send(`cancelled`));``` and you can add the owneronly bit onto the filter if you want
honest perch
#

@pale vessel how would i then get the invite out of that regex for example for it to only show the posted invite

lusty quest
#

define your stuff you want to update as a array like the way you set it to the config

jolly wave
#

time to learn some js

lusty spade
#

oh ok

pale vessel
#

use brackets and .match()

honest perch
#

im using match

pale vessel
#

match will return the detected expression

#

console.log(content.match(...)) in that block

#

you should define it once

#

and check if (match) { console.log(match); }

#

i'm eating so gtg

lusty spade
#

@lusty quest like this?


const guildSchema = mongoose.Schema({
    _id: mongoose.Schema.Types.ObjectId,
    guildID: String,
    guildName: String,
    prefix: String,
    Settings: Array[{
        modlog: String,
        serverlog: String,
        messagelog: String,
        antilinks: Boolean,
    }],
});

module.exports = mongoose.model('Guild', guildSchema, 'guilds');```
haughty igloo
#

Sstt

honest perch
#

oh ffs

lusty quest
#

you can do this also

#

wait remove Array

lusty spade
#

ok then?

#

just remove it?

robust arrow
#
if (command === 'yesorno') {
        if (!args.length) {
            return message.channel.send(`${config.no} the bot can't answer to emptiness, ${message.author.username}`);
        }```
so somehow this is deleting the command, sometimes it doesn't delete it. I don't want it to delete the command at all
#

that's just a small part of my code

honest perch
#

@pale vessel nvm got it

cerulean venture
#

I'm currently trying to send a message to all servers my bot is in but I'm kinda stuck since it just sends it to 1 server.

                        guild.channels.forEach(channel => {
                            bot.channels.find(channel => channel.name === 'general').send('**THIS IS A TEST**' + 'Happy birthday to ' + '<@'+results[i].bdUser+'>' + ' Take a shot!' + '**THIS IS A TEST**')
                        })
                    })```

Any ideas?
sudden geyser
#

You should avoid doing that.

cerulean venture
#

why?

sudden geyser
#

It's spammy and typically unwanted, unless it's a opt-in feature or something.

cerulean venture
#

I mean it's kinda opt-in

#

since it actually checks if there is a birthday channel (well as soon as it works)

solemn latch
#

Djs 11?

cerulean venture
#

ye

sudden geyser
#

It looks like you're trying to find a channel by the name of general. Plus, it doesn't seem it matters on which guild(s) the user is from, which would cause it to go to all guilds. Anyway, it seems spammy for the API.

The issue is that you're trying to re-find the channel in an inner forEach loop with the same variable name as your forEach loop (.forEach(channel => { vs. .find(channel => ). You should just scrap that part and check if channel.name is equal to whatever birthday channel is supposed to be set.

I still don't recommend going through with it.

cerulean venture
#

I mean I could also add a command to enable the birthday thing if needed, would make it easier I guess

lusty quest
#

@lusty spade did you got it working?

solemn latch
#

A few people reported their bots got banned from discord(and where told to contact discord) for having spammy features.
This happened earlier this week.

Theres a good possibility that a feature like this will result in you hitting ratelimits pretty quickly.

#

Potentially getting the same result

cerulean venture
#

hmm

#

I mean I could also just add guild id's I guess that want it?

#

instead of sending it to every server

lusty spade
#

@lusty spade did you got it working?
@lusty quest no the array has now has _id but it still gives the same error when i try to update it

lusty quest
#

are you sure you dont have any spelling mistake?

lapis oyster
#

hey there is there any bot that collects email from user when they join and assign a role after that ??

#

please help

lusty quest
#

why would you do this?

misty sigil
#

what

lusty spade
#

yea im pretty sure

sudden geyser
#

Lysec in general, you should avoid doing an action that may or may not send several API requests in bulk, like how you're trying to iterate over all guilds channels and see if it equals general. Imagine if 20 channel names are equal to that.

misty sigil
#

why the hell would you need that

solemn latch
#

You can make servers with 500 channels names general

#

So your bot would send 500 messages for every birthday

lusty quest
#

it adds a new layer of protection the Hoster of the bot needs to do then (encrypting the Database)

solemn latch
#

For one guild

#

Imagine someone maliciously making 10 accounts with the same birthday

#

5000 messages

misty sigil
#

rat limit

solemn latch
#

In a short period of time

cerulean venture
#

true

solemn latch
#

Its not only a bad idea, its a scary idea

sudden geyser
#

how many 429/401/403s is it to get blocked for an hour

cerulean venture
#

urgh ._. I liked the idea but didnt think that far

sudden geyser
#

I think they changed it

lusty quest
#

@lusty spade did you tryed how they show it in the stackoverflow page?

stable eagle
#

message.channel.send(gayembed);

#

for some reason,

earnest phoenix
#

Ok i tried to create a bot

misty sigil
#

error and code pls

stable eagle
#

I get a refrence erro: message is not defined

#

?

misty sigil
#

code

stable eagle
#

ok

scenic briar
#

Is it possible for a 14 yearold to be a fullstack Javascript dev

earnest phoenix
#

I get a refrence erro: message is not defined
maybe u didnt define it

misty sigil
#

yes if you work hard enough

honest perch
#

how would i check if a user has a role or not in eris

earnest phoenix
#

Is it possible for a 14 yearold to be a fullstack Javascript dev
yes

scenic briar
#

Thanks

lusty spade
#

yea i tried to put _id and it said it changed it but when i check nothing changed

misty sigil
#

but fullstack js dev makes no sense

scenic briar
#

oh

stable eagle
#
    name: 'gay',
    description: 'See how gay a person is lol',
    execute(message, args){
    let gayembed = new Discord.MessageEmbed()
            .setDescription(${message.author}, you are + Math.floor(Math.random() * 100) + `% gay. :rainbow_flag:)
            .setColor("#A4C9F6")
            message.channel.send(embed)
            message.delete()
        }};

message.channel.send(gayembed);```
solemn latch
#

Whats with the obsession with becoming a fullstack dev anyway

stable eagle
#

I get a reference error with "message"

misty sigil
#

message.channel.send is outside of execute

stable eagle
#

oh

earnest phoenix
#

is that js

solemn latch
#

Yeah

earnest phoenix
#

cool

cerulean venture
#

@solemn latch it apparently only sends it to 1 channel, no matter how many channels there are with the same name

#

so seems like that wouldnt be an issue

sudden geyser
#

that's because you made a small error in your code

#

plus it still says the same message multiple times in that channel correct?

unreal solar
#

sorry to interrupt, i'm getting a "DiscordAPIError: Missing Permissions" error when i try adding roles using my bot, is that exactly what i think it is and the bot's lacking the perm to give roles out?

misty sigil
#

it is

cerulean venture
#

uhm I tried it with a different command of mine, lemme see how it works with the birthday one

misty sigil
#

thats exactly what it is

unreal solar
#

huh

#

im scratching my head then

#

it has the ability to kick and ban but not apply multiple roles

lusty quest
#

Manage Roles is needed

unreal solar
#

ahhhahaha

cerulean venture
#

@sudden geyser it sends it 5 times because it's on 5 servers currently

#

I guess it would send it once to every server if I did it right

lusty quest
#

also the bot needs to have a role that is a higher rank than the roles you want to give

unreal solar
#

higher literally in position?

lusty quest
#

add .cache

sudden geyser
misty sigil
#

its message.guild.channels.cache

cerulean venture
#

Yeah so that should work then

misty sigil
#

try updateOverwrite

lusty quest
#

did someone know if you can read stuff directly from a Github repo into javascript? like having a json stored in a github repo and then just pull it when the bot starts. (Translation for the bot)

unreal solar
#

Superbrain, moving the bot's specific Role physically above the roles it was granting in the List fixed the issue, thanks!

misty sigil
#

and its {
id:userid
deny:["SEND_MESSAGES", "ADD_REACTIONS"]
} for updateOverwrite

solemn latch
#

Probably something you can do with the github api

misty sigil
#

then its role id

lusty quest
#

time to read some docs

misty sigil
#

idk i don't do mine like that

#
message.guild.channels.cache.forEach(channel => {
        channel.updateOverwrite(muterole.id, { SEND_MESSAGES: false, ADD_REACTIONS: false });
});```
dense patio
#

(discord.js v11) how do i get a user object from another shard using their id

sick cloud
#

move to v12 for one

dense patio
#

what is it in v12

opal plank
#

discord.js v12

sick cloud
#

<client>.users.fetch(<id>)

opal plank
#

v11 is deprecating this week iirc

dense patio
#

that works across shards?

solemn latch
#

Its already deprecated isnt it?

sick cloud
#

yes because it fetches from the api

opal plank
#

im not sure woo

sick cloud
#

doesnt matter if its on that shard or not

solemn latch
#

They are not doing any patches to it

dense patio
#

ok

sick cloud
#

v11 breaks in october

opal plank
#

october it is then

#

i remember seeing the guide showing it

dense patio
#

well luckily i don't have many things that rely on discord.js v11's specifics

opal plank
#

on the bottom, with a notification

solemn latch
#

October is when it doesnt work. Its already deprecated

sick cloud
#

v11 will die in october because it doesnt have the required features to run with discord's api

earnest phoenix
#

hi guys i have a question so there is something called bot designer for discord and i used it and made a good bot can that bot get verified too? for me to get verified bot dev

solemn latch
#

If it has custom commands

earnest phoenix
#

yeah it does

#

i made the commands

#

on it

sick cloud
#

why not just learn to code

earnest phoenix
#

its hard i tried

#

everything just mess up

solemn latch
#

Thats part of the fun

earnest phoenix
#

i want to make a bot but like i dont know how to code

#

it looks hard asf

misty sigil
#

hi guys i have a question so there is something called bot designer for discord and i used it and made a good bot can that bot get verified too? for me to get verified bot dev
@earnest phoenix afaik you cannot get verified

sudden geyser
#

hard is just an obstacle.

misty sigil
#

hard makes it fun

solemn latch
shy turret
lusty quest
#

now i wonder what would make more sense. grabbing my translation files from github and store them as json on my bot or make a collection and store the json in there. (pulls the files each time the bot restarts)

solemn latch
#

Is there a specific reason it has to be from github?

#

Do you not download the json from github when you get everything else?

lusty quest
#

i can make it open to translate for others

#

if they spot a spelling mistake make a pr and i can easy merge it

earnest phoenix
#

😔 can anyone dm me a good vid thats shows how to make a bot

misty sigil
#

dont follow youtube tutorials, as they are likely outdated

solemn latch
#

Videos are not really the best for development

earnest phoenix
#

oh ty

sudden geyser
#

well what language do you want to learn

knotty steeple
#

if u think js is hard look at haskell

solemn latch
#

The emoji programming language

earnest phoenix
#

i want an easy language

knotty steeple
#

js

earnest phoenix
#

what should u recomment

#

nd

odd lichen
#

Hello,

I am making a bot and everytime it sends a message I add a ❌ to the message in case they want to delete it. At the moment I have a reactionCollector running on it but it times out. Is there a way to not have a collector at all and just check on a messageReactionAdd event to see if the user reacted on the message of the bot?

(Using discord.js v12.2.0)

knotty steeple
#

python

sudden geyser
#

python is bae

solemn latch
#

Python or js

earnest phoenix
#

oki il look online for python tutos

knotty steeple
#

@odd lichen u can

odd lichen
#

well I tried checking for the author of the message but i cant seem to get it shrugStitch it appears as null

knotty steeple
#

u have to use name

odd lichen
sudden geyser
#

@odd lichen on the messageReactionAdd event, the second parameter is the user instance, which is who added the reaction

odd lichen
#

yeah but i also have to check for the author of the message that was reacted on

#

to make sure it was the bot

#

who owns the message that was reacted to

solemn latch
#

Shouldn't author only ever be null if the message was made by a webhook?

odd lichen
#

its made by the bot

#
  • I probably also have to check if the bot itself also reacted on the message
sudden geyser
#

well you could use reaction.message.author.id (reaction is the first parameter) to get the author ID of the message the reaction came from, which you can then compare the bot's user ID

odd lichen
#

is there also a way to check if the bot reacted with ❌ too?