#development

1 messages · Page 1073 of 1

digital ibex
#

1 sec

#

oh

#

its just 0x8

#

not 0x08

#

the way i do it is user.guilds.filter((e) => e.permissions & 0x2)

earnest phoenix
#

@opal plank

opal plank
#

dude

#

nono

#

in the link

earnest phoenix
#

oh ok

opal plank
#

here

#

no spam

earnest phoenix
#

is that all u need or do you need my commands

opal plank
#

this is really bad btw

earnest phoenix
#

oh

opal plank
#

you should really get a handler because you already have the commands on different files

earnest phoenix
#

i do

#

wait

opal plank
#

thats not a handler lol

#

thats just if statements

#

this is a type of handler

digital ibex
#

@honest perch does it work?

opal plank
#

but let me check why yours is outputting multiple times rq

#

@earnest phoenix send the help command

earnest phoenix
#

okay

honest perch
#

didnt try it wait up

earnest phoenix
honest perch
#

yep that also works

opal plank
digital ibex
#

ok

opal plank
#

Hmm im not seeing anything that would loop the command tbh

earnest phoenix
#

now i restrated the bot

#

let me try it

#

its bot looping rn

#

but when i edit something in the code

#

and restart the bot

#

it does it

#

so will i literally just have to close VS everytime

opal plank
#

wait

#

do you have 2 instances of the bot online?

#

or just VSC?

earnest phoenix
#

vsc

opal plank
#

hmmm

earnest phoenix
#

you know in cmd

opal plank
#

yeah

earnest phoenix
#

do i need to stop the bot

opal plank
#

though you should use debugger instead

earnest phoenix
#

before like editing the code

opal plank
#

when the bot goes on, it'll keep that code it was ran with, any edits wont change the bot unless you specifically change the cache

#

which is a saving grace for reloading commands without having to restart the bot

earnest phoenix
#

okay

#

Thanks

#

wait so should i do this

#

for the dynamic commands thing

#

so instead of this put what i sent above

sand scroll
#

why am i getting a displayAvatarURL error?

blazing portal
#

Because it's a function. Not a property

sand scroll
#

but it was working a second ago

#

after looking at Not Erwins command handler

#

i changed into a proper command handler

#

and now i get this error

#

i use it in a embed

blazing portal
#

Show me the code for the embed

sand scroll
blazing portal
#

I see. You're using the function. Are you sure the msg.author is defined? Because the error says it's not

sand scroll
#

hmm

#

i mean why wouldn't it be?

blazing portal
#

If the message isn't cached or it's a partial, and you try to access information without fetching it first

sand scroll
#

hmm

#

should i send the whole file?

#

oh what?

#

im getting a different error now

#

it now says that displayAvatarURL is null

#

so you dont know?

#

hmm

cunning gorge
#

What does
Math.random()>=0.5 do?

sand scroll
#

show full code

#

Math.random gets a random number between 0 and 1

#

if that's an if statement then it's telling the code that if the number is above 0.5 run whatever code is in it

slender thistle
#

Math.random() generates a random number between inclusively 0 and exclusively 1

sand scroll
#

shivaco

slender thistle
#

So you could say that's used to calculate a 50% chance for something

cunning gorge
#

k thx

sand scroll
#

my code runs perfectly without the msg.author.displayAvatarURL()

wicked pivot
#
if(bot.member.voiceChannel){
        return message.channel.send('bot already in a vocal')
    }```

``` TypeError: Cannot read property 'voiceChannel' of undefined
0|main  |     at Object.module.exports.run (/root/juzoo/src/radio.js:9:19)
0|main  |     at process._tickCallback (internal/process/next_tick.js:68:7)``` ![Detente_ref](https://cdn.discordapp.com/emojis/547849405210951708.webp?size=128 "Detente_ref")
sand scroll
#

i searched online for answers (to my question) and i found one stack overflow that had a wrong answer

#

smh my head

knotty steeple
#

@sand scroll msg.author is null

#

it says that

sand scroll
#

hmm

#

then how would i make it not null

sudden geyser
#

@wicked pivot if bot is a Client instance, it does not have the member property.

sand scroll
#

because it worked before i changed the way i did my command handling

#

i dont think its a problem with the code itself

#

maybe it's a problem with my command handling?

celest schooner
#

with pm2 do you have to add -g to the npm download

sudden geyser
#

You should get the Guild instance then use the .me property instead. Also, .voiceChannel is no longer a thing (.voice.channel).

knotty steeple
#

@celest schooner yes

#

so u can run it

celest schooner
#

oh

sand scroll
#

it says they fixed it in the newest version of discord.js

#

about message author being null

#

clearly not though

knotty steeple
#

version 5

sand scroll
#

but i am version 5

knotty steeple
#

what

#

the latest version is 12

earnest phoenix
#

Anyone knows why i am getting this error The request cannot be completed because you have exceeded your <a href="/youtube/v3/getting-started#quota">quota</a>. for youtubes api v3 when not even being close to exceeding there limit.

digital ibex
#

you're being ratelimited

earnest phoenix
#

But how

digital ibex
#

too many requests

earnest phoenix
#

I made 280 requests in this whole day

digital ibex
#

log the status code

earnest phoenix
#

403

digital ibex
#

just to make sure

#

yeah

earnest phoenix
#

yeah i understand that im getting ratelimited

proven lantern
#

do you have other accounts using the same api key?

earnest phoenix
#

no i only use it for my bot

#

no one has it

digital ibex
#

maybe someone is spamming commands

#

you also need to ratelimit them

earnest phoenix
#

no it is for my beta bot

#

i do

#

i put my main bot offline

opal plank
#

youtube has a quota system where each operation costs money

#

depending on how large your bot is/command usage, you'll hit that rather quickly

#

i havent used youtube api because of that. While good, it has way too much limitation

digital ibex
#

quick question... what url should i use to make a get request to get the user object?

opal plank
earnest phoenix
#

278 requests in 24h

opal plank
#

it depends what type of requests you are doing

digital ibex
#

get

earnest phoenix
#

what do you use then @opal plank

opal plank
#

spotify wrapper would be a better option for search

#

though i havent used VC much at all

digital ibex
#

any ideas, erwin?

opal plank
#

user object about what?

#

you want to use api to get a user?

earnest phoenix
#

i use the simple-youtube-api module btw

digital ibex
#

discord user object, js { username: 'OfficallyLost', id: '475371795185139712' ... }

opal plank
#

you want to manually fetch it, correct?

digital ibex
#

yes

opal plank
#

d.js?

digital ibex
#

what

#

no

opal plank
#

discord.js?

digital ibex
#

im not using a library

opal plank
#

which lib you on

#

manually?

digital ibex
#

yes

opal plank
#

axios? curl?

pure lion
digital ibex
#

just node-fetch

opal plank
#

i see

#

lemme check the portal rq

digital ibex
#

all i need is the url but i cant find it

opal plank
#

actually

#

i think you dont need auth for user

#

holdon

earnest phoenix
#

erwin

opal plank
#

at least for public

earnest phoenix
#

someone commented under that link u sent

#

that you only get 10k units nowadays

opal plank
#

on youtube?

earnest phoenix
#

ye

opal plank
#

fat rip, like i said, try spotify instead of youtube

digital ibex
#

im not trying to connect, im just trying to get the user object form a users id. and all i need is just the url lmao

#

like

#

fetch('this thing here'..)

#

oh

#

wait

opal plank
digital ibex
#

im literally retarded

#

🤦‍♂️

#

thanks anyways though :)

opal plank
digital ibex
#

i might make a library just for my bot for what i need

#

its pretty simple for specific stuff, i recommend trying it

opal plank
#

that should be the url

digital ibex
#

yeah

opal plank
#

im not sure if you even need auth token on that

#

you might though

#

nvm you do

#

just auth token and thats it

#

just tried

digital ibex
#

oh right

old pilot
#

okay so im very new to coding and things

#

and like

#

i dont know how to import discord libraries

#

or whatever

sudden geyser
#

What language are you using and what's the name of the library you're using.

old pilot
#

python

honest perch
#

Learn the language you're using pls

sudden geyser
#

Use the import keyword. Search it up for more info.

old pilot
#

ok

honest perch
#

Learn the language you're using pls

old pilot
#

hm

sand scroll
#

im making an embed in another file

#

and it says that msg.author is null

#

and it cant access displayAvatarURL() because of that

#

any ideas?

valid frigate
#

supposedly this is a bug in discord.js

sonic copper
#

hey friends! I'm working on adding music commands to my bot. Right now, it works but you can only play one song at a time. If you use the command again, it'll skip the current song and play the new one. What would be the best way to go about adding a queue to this?

Here's my current code for reference

ancient falcon
#

someone knows how user public flags work

#

like what exactly the number represents

digital ibex
#

so uh... does anyone know why im getting this error

#

?

#

my code: ```js
await fetch(https://discord.com/api/users/${req.user.id}, {
method: 'GET',
headers: { 'Content-Type': 'application/json' },
authorization: Bot ${process.env.CLIENT_TOKEN}
});

earnest phoenix
#

someone knows how user public flags work
@ancient falcon it's a bitmask

#

to check if a bitmask contains the value use the bitwise AND

ancient falcon
#

ah I see thank you

ornate flax
#

I'll ask you something. Household Discord Bots also have language support or how do they do it, I make bots, I can do it by adding different commands 😦 Does anyone know who knows how to do something?

quartz kindle
#

if you mean multilingual bots, store language configuration in database, put all your textual data in a strings file or database table/document

#

use guild id to load correct strings file, load all textual data from there

fallow sentinel
#
client.commands = new Discord.Collection();
                              ^

TypeError: Cannot read property 'Collection' of undefined
    at Object.<anonymous> (/storage/emulated/0/Discord-TenZO-Bot/index.js:6:31)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47```
can someone help please
unborn haven
#

can someone send me the code on how to do this command (i did it after 8 hours of reasearching and then i accedently deleted it) but can someone just make the code and send it to me pls

#

?????????????????????????????????????????????????

calm meadow
#

lol

#

just create an embed

#

and insert fields to the embed

#

with inline set to true

ornate flax
#

if you mean multilingual bots, store language configuration in database, put all your textual data in a strings file or database table/document
@quartz kindle I am Turkish, I will only add the English language, should I do it the same way?

#

and I don't understand so much

sudden geyser
#

@fallow sentinel the discord.js module does not export an object called Discord. It does export one called Collection, which is what you're looking for.

#

This is because you're de-structuring it.

quartz kindle
#
let texts = {
  english:["hello","bla","etc"],
  turkish:["sa","???","."]
}

let lang = database[message.guild.id].language

message.channel.send(texts[lang][0]) // hello in the correct language
unborn haven
#

@calm meadow i know thats kinda obvious but how do i do it to make it go live. for example if i go to another server and do the samething i want to see the server owner and the members and all that stuff

#

and if its so easy can u send a screenshot of the codes

earnest phoenix
#

stop begging for code

#

you claim you did it already

#

... just rewrite it

unborn haven
#

i juSt deleted it i already explained that and i can t undo it

ornate flax
#
let texts = {
  english:["hello","bla","etc"],
  turkish:["sa","???","."]
}

let lang = database[message.guild.id].language

message.channel.send(texts[lang][0]) // hello in the correct language

@quartz kindle THANK YOU ❤️

earnest phoenix
#

yeah and i told you to rewrite it

violet mason
#

Recycling bin doggowave

unborn haven
#

i just dont want to spend half a day looking foor nothing again so thats why i am asking help

earnest phoenix
#

but you won't

unborn haven
#

i did

earnest phoenix
#

what

unborn haven
#

and its anoying'

earnest phoenix
#

will not is a future tense

#

anyways

#

you won't spend as much time

violet mason
#

Recycling bin doggowave
@unborn haven

earnest phoenix
#

you already know what you need to do now

unborn haven
#

i dont because i deleted the whole thing accedenly and when i mean the whole thing i mean the WHOLE BOT because my smaller brother flipen deleted my project that took me like 3 weeks to make

earnest phoenix
#

you already did research

#

and it's in your browser history

violet mason
#

But recycling bin

#

😐

unborn haven
#

yes but the reasearch was like few weeks ago

violet mason
#

K imma just stop trying

earnest phoenix
#

i have search history from 6 months ago

unborn haven
#

and my flippen brother deleted the bot today

cobalt eagle
#

hey small update on my progress concerning the language changing thing : i learnt how to use mysql, integrated the auto updating table (it adds the server in the list when the bot join it, delete it when he leave and the name is changed in the list if it's changed)

#

now i "just" have to make the actual language thing, it needs to detect whenever the server is in french or english when a command is typed, so it'll display the corresponding one. and the language changing thing

#

and i'll be done

#

so thanks to the guys that helped me earlier

earnest phoenix
#

id advise not automatically deciding what language

#

to use

#

use english by default and let the user configure it

calm meadow
#

and u never even specified which language either

#

or which framework

earnest phoenix
#

they're lying if it wasn't obvious already i was just playing along to make them trip on their own lies lol

cobalt eagle
#

@earnest phoenix I was saying like it will look the database to see if the server is in english or french and then use the french or english command. But yeah, that's exactly what i'm gonna do

calm meadow
#

they're lying if it wasn't obvious already
@earnest phoenix
yeah it's obvious, but they clearly don't know what they are doing. hopefully they learn something from looking at an example of the code

earnest phoenix
#

i sincerely doubt it, there is a small chance but these people are help vampires, they refuse to learn and only want the code lol

digital ibex
#

another question if anyone knows, i've got this: js const e = await lost.getUser(req.user.id).then((e) => e); console.log(e.id); and i get an error saying e is undefined, any ideas why this is happening?

sonic copper
#

If they’re using discord.js the starting guide quite literally tells you how to do things like that. So like. 🤦🏻‍♀️

unborn haven
#

@calm meadow and if u can read for ike the 3rd time the BOT GOT DELETED SO NO i cant send the codes and u were saying its so easy i wasnt i was asking for help

calm meadow
#

no I'm saying

#

the bot got deleted

#

ok

#

just code it again

#

why ask someone else to code your bot again?

#

if you did it once, just do it again

unborn haven
#

i do not hve a backup

calm meadow
#

ok..

#

then code it again

sonic copper
#

I can't count how many times I've had to redo my entire bot because my dumbass doesn't back his shit up either

#

code it again. No one here is going to do it for you

unborn haven
#

u think i can remember a bunch of characters or how to code one command in 3 weeks NO

digital ibex
#

i'll do it for a small price of only £350

#

lol

sonic copper
#

I'll do it for $200

calm meadow
#

I'll do it for $150

unborn haven
#

i am not paying anybody nothin

digital ibex
#

i'll do it for £100

#

are you have retarded

calm meadow
#

i am not paying anybody nothin
@unborn haven
then code it yourself JiuSmile

unborn haven
#

i swear to god

calm meadow
#

if it took you 8 hours the first time

#

it'll take you less this time

sonic copper
#

☝️

unborn haven
#

omg

calm meadow
#

also I literally linked an example with discord.py framework

#

you can use that for reference

#

if you want

sonic copper
unborn haven
#

it was 3 weeks ago i did that code, today my dumbass brother deleted my bot

calm meadow
#

okay..

#

and we're offering you a solution?

unborn haven
#

and u expect me to remember that

sonic copper
#

You can either do it yourself or not do it at all. Because no one here is doing it for you

calm meadow
#

we don't expect you to remember it

#

we expect you to research how to do it again

unborn haven
#

what is the offer, go on

sonic copper
#

Here. I'll even point you to the correct portion of the discord.js that shows you an example of what you want

#

You have to do the rest on your own

calm meadow
#

good luck

#

hope you learn something ( and make backups )

digital ibex
#

so uh, anyone know my issue?

#

await lost.getUser(req.user.id).then((e) => e); is undefined for some reason.

#

im not using a library btw

#

it was working perfectly fine before i put it into classes, and now its not

sonic copper
#

I have no clue tbh. I hope someone else here can help ;-;

crisp geyser
#

what is lost?

unborn haven
#

@calm meadow @sonic copper sry i didn't realise that u guys sent me examples i was just getting carried away cause i still cant beleive my fu**ing brother deleted my bot that i spent almost a month on

digital ibex
#
const Client = require('../classes/Client');
const lost = new Client();```
crisp geyser
#

btw, you should do this as far as I know

var e = await lost.getUser(req.user.id);
or lost.getUser(req.user.id).then((e) => e);

digital ibex
#

wut

cobalt eagle
#

hey huh

#

how do i get my data from MYSQL to my code ?
I need to get the "language" from my table and if it's english then change it to french and vice versa.
But when i try this :

            con.query("SELECT language FROM serveurs WHERE serverid = '" + message.guild.id + "'", function (err, rows) {
                if (err) {
                    console.log(err.message);
                }
                const embed = new MessageEmbed()
                    .setColor(0x854a96)
                    .setDescription(rows);
                message.channel.send(embed);
            
            });
#

it writes "undefined"

#

apparently i need to make a callback

#

but i have no idea how to do a callback

sudden geyser
#

Do you mean it sends an embed saying undefined

cobalt eagle
#

exactly

sudden geyser
#

Does it log anything to the console

cobalt eagle
#

nope

sudden geyser
#

Are you using MySQL?

cobalt eagle
#

yes

sudden geyser
#

To my knowledge, would rows not be an array?

cobalt eagle
#

idk

sudden geyser
#

.setDescription takes anything that can be resolved into a string, which does include arrays (it would be split by a line break). You could try logging err and rows to the console to see what you're getting.

cobalt eagle
#

ok thanks

#

don't work with the .setDescription, still undefined

unborn haven
#

what is the args list

cobalt eagle
#

all the arguments you have in the function

#

you just need to add a ")" at the end

#

and you need to removes the quotes and the {} before and after the variables

#

so it should be : ```js
embed.add_field(name="Owner", value=guild.owner + ' (' + guild.owner.id + ')', inline=True)

#

here are the syntax errors

#

but idk if there are logic errors

unborn haven
cobalt eagle
#

yeah, do you get any error if you run it like this ?

unborn haven
#

let me check thx

#

ye but its another command so wait

cobalt eagle
#

ok

unborn haven
cobalt eagle
#

you should better try writing it like this :

            const embed = new MessageEmbed()
                .addField('Things:', variable1 +'non variable' )
            message.channel.send(embed);
#

like the last one of your screenshot

unborn haven
#

ok

#

i'll try

#

thx so far

cobalt eagle
#

np

unborn haven
#

: )

digital ibex
#

um what

#

if he's using python, why are you giving js code?

cobalt eagle
#

ooooooooh

#

sorry

#

i'm so dumb

#

i didn't thought it was python

unborn haven
#

iam running js

cobalt eagle
#

!

unborn haven
#

?

cobalt eagle
#

so i'm not dumb

unborn haven
#

i am confused

#

@digital ibex why do u think i am using pyphon?

digital ibex
#

ok wtf

unborn haven
#

python

#

i am using .js

sonic copper
#

Yeah I got some serious python vibes from that code.

sudden geyser
digital ibex
#

because thats python

#

dont copy and paste code

sonic copper
#

sigh plague. I thought we talked about this

cobalt eagle
#

is python code

#

you sould note use it in js

digital ibex
#

what

unborn haven
#

wait

#

but i am writing the codes in a javascript file?

digital ibex
#

i am moyaing so hard rn

#

🗿

cobalt eagle
#

wdgx

#

is you file a ".js" file ?

unborn haven
#

yes index.js or node .

earnest phoenix
#

learn to code

digital ibex
#

you probably want to learn javascript and node

earnest phoenix
cloud nymph
#

So your coding in January?

sonic copper
cloud nymph
#

*js

sonic copper
#

Here’s the js guide on embeds.

I highly recommend reading through the entire guide though. It’s a good starting place

earnest phoenix
#

learn JS first smh

fallen river
#
@bot.command()
async def embed(ctx, *, a):
    await ctx.message.delete()
    embed=discord.Embed(title=f"{a}", color=0xffc8ff)
    await ctx.send(content="", embed=embed)
#

oop wrong code

#

im a little retarded, bye

unborn haven
#

bye?

fallen river
#
@bot.command(name='clear', help='clears messages [default 5]')
@commands.has_permissions(manage_messages=True)
async def clear_messages(ctx, amount=5):
    await ctx.channel.purge(limit=amount+1)
    print(f'Cleared {amount} messages. command by {ctx.author}.')
unborn haven
#

hi

sudden geyser
#

catnip what

cobalt eagle
#

wtf catnip

#

no simple embeds are like i showed you

#
        const embed = new MessageEmbed()
                .setColor(0x854a96)
                .setTitle('Voici la liste des commandes :')
                .setThumbnail(client.user.displayAvatarURL)
                .addField('- Modération :', 'ban, kick, say, sayembed')
                .addField('- Utilitaires :', 'ping, userinfo, avatar, pf, dé, time, bot-infos, app-infos')
                .addField('- Fun :', 'choix, propagande, rdude, sextests, décris-moi, blague, anti-dépresseur')
                .addField('- Musique :', 'join, leave, en cours de développement...')
                .setFooter('Pour avoir plus d\'informations sur une commande faites : *help <commande>')
            message.channel.send(embed);
#

(don't mind the french language)

sudden geyser
#

what are you two even talking about

cobalt eagle
#

pluquechop was having trouble with embed, because he was using python code on js file lmao

sudden geyser
#

I think your issue is just you trying to pass something that's not StringResolvable

earnest phoenix
#

Guys, what's the permission to removing reaction, adding reaction is ADD_REACTIONS but what removing them?

#

Why does nobody here know how to code properly

sudden geyser
#

rows should be an array but seems to be a custom type. Either way, you should realistically be passing a string.

#

Rigidity you have made me sad with this message.

earnest phoenix
#

not you lmfao

#

i mean most of the scriptkiddies here

#

the ones without green name

#

or purple or red

#

<You also have the green name>

#

But hidden

cobalt eagle
#

meeeh i don't have the green name :c

earnest phoenix
#

im saying 95% of people without roles here dont know jack shit

#

lmao

#

Me sitting here watching people not being able to do anything with code while me creating complex functions and bots on just mobile

sudden geyser
#

The role doesn't mean anything really.

cobalt eagle
#

Thx Lite btw

sudden geyser
#

yeah np

earnest phoenix
#

@earnest phoenix same tho

#

you code on your phone as well?

#

Mobile gang ayb_blobParty

#

Guys, what's the permission to removing reaction, adding reaction is ADD_REACTIONS but what removing them?
@earnest phoenix anyway idea?

#

@earnest phoenix hell yea mobile gang

sonic copper
#

My fingers are too fat to code on mobile.

earnest phoenix
#

hehe

cobalt eagle
#

coding on phone uncomfortable as hell

sudden geyser
#

Manage Messages

#

If you want to remove other people's reactions.

#

You should be able to remove your own regardless to my knowledge.

earnest phoenix
#

What about bot's own reactions

sudden geyser
#

The bot is just a user. It shouldn't be any different

earnest phoenix
#

yup

#

Uhh... I mean... Bot removing it's own reactions Should't need permissions Should it

#

no

#

bot adding reactions is the only thing that requires perms

#

same for users

#

We all know bots are users, just doesn't have access to user endpoints @sudden geyser

#

Which apps do you use Voltrex

#

For mobile dev

#

I use Koder and iTerminal

cobalt eagle
#

Rigidity is right

earnest phoenix
#

Mixplorer's code editor and termux for some situations

#

Oh Android?

sudden geyser
#

Bots and users both share similar endpoints. Some endpoints just can't be accessed by bots while some can't be accessed by users.

earnest phoenix
#

Keyboard go brrrr

#

Ik about reactions, but i think every reaction has it's own object containing users who reacted in the reactions property of the message

#

Filter to remove the reaction of the bot itself?

digital ibex
#

all endpoints can be accessed by users

#

assuming their authorised to do so anyways

#

ie. have the correct permission

earnest phoenix
#

No, users can't send embeds can they

digital ibex
#

oh lol. apart from that

sudden geyser
#

They can.

#

It's just against the ToS.

earnest phoenix
#

Only self bots can

digital ibex
#

does anyone know how to fix my issue, also?

sudden geyser
#

Filter to remove the reaction of the bot itself?
@earnest phoenix a bit confused. do you mean you want to remove only your bot's reaction to a message? For example, if three users reacted with 🎉 and you wanted to remove your bot's reaction, would it go down to 2, or remove all three of them.

#

What's the issue you're having

digital ibex
#

i posted it a while back, its just that ```js
await lost.getUser(req.user.id).then((e) => e);

#

lost is my client, nothing to do with d.js or eris or any of that.

#

and that code returns undefined for some reason

earnest phoenix
#

@sudden geyser facepalm "reaction of the bot itself", of course only the bot's reaction

digital ibex
#

if (user who reacted.id == client.user.id) return; ?

earnest phoenix
#

I wonder why are you using await and .then() at the same time

#

They both resolve a promise

#

reaction.users.remove(user)?

digital ibex
#

idk its weird. i done await client.getRESTUser(user id).then((e) => e); for it to work for eris, nothing else would work. and im trying to implement the same logic here

sudden geyser
#

Then you're probably looking for <ReactionManager>.get(...).users.remove(...)

#

Though .get takes a snowflake and for a reaction that's quite weird

earnest phoenix
#

No because it's a literal collection, collection.get takes the element name

#

From the map of the collection of course

digital ibex
#

for more context: ```js
const Client = require('../classes/Client');
const lost = new Client();

cobalt eagle
#

I HAVE IT

#
result[0].language
#

(i replaced rows by result)

#

and it's working

hearty wind
#
@client.command()
async def poll(ctx):

    if str(ctx.author) == "penche#7432" or str(ctx.author) == "SWAGHETTI#7791" or str(ctx.author) == "Winter#7588":
        message = await ctx.send("**----POLL----** \n \n**Green Today?** :thumbsup: \n \n**Red Today?**   :thumbsdown:")
        await message.add_reaction('👍')
        await message.add_reaction('👎')
        thumbs_up_count = 0
        thumbs_down_count = 0
        message_id = await message.channel.fetch_message(message.id)
        for second in range(20):
            for reaction in message_id.reactions:
                if reaction.emoji == '👍':
                    thumbs_up_count = reaction.count
                if reaction.emoji == '👎':
                    thumbs_up_count = reaction.count
                await message.edit(content=("**----POLL----** \n \n**Green Today?** :thumbsup: {} \n \n**Red Today?**   :thumbsdown: {}".format(thumbs_up_count,thumbs_down_count)))

hello I am trying to create a bot that makes a poll. it adds the emojis, and when people start voting thumbs up or down it edits the message with the results. this is what i have but it's not really working cause it just goes back to 1 even though its 2 thumbs up. any ideas?

cobalt eagle
#

ok so now i have everything i just need do copy paste and translate things, thanks a lot

old pilot
#

alright i’m back

#

wait nevermind

flint python
#

How do I get bots in my sever

old pilot
#

like your own?

flint python
#

Yeah

old pilot
#

uh

#

you have to like

#

get the link thing

#

from oauth2

#

or whatever

restive gust
#

Hallo

hazy blade
#

hey

#

i got this error

#

C:\Users\ASUS\Desktop\bot discord\src\Client.js:139
const command = new Command(this); // Instantiate the specific command
^

TypeError: Command is not a constructor
at C:\Users\ASUS\Desktop\bot discord\src\Client.js:139:25
at Array.forEach (<anonymous>)
at C:\Users\ASUS\Desktop\bot discord\src\Client.js:137:16
at Array.forEach (<anonymous>)
at Client.loadCommands (C:\Users\ASUS\Desktop\bot discord\src\Client.js:135:56)
at init (C:\Users\ASUS\Desktop\bot discord\app.js:21:10)
at Object.<anonymous> (C:\Users\ASUS\Desktop\bot discord\app.js:26:1)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)

#

this

#

how can i fix it

#

i add weather command in my bot

flint python
#

How do I get a bot to welcome people

old pilot
#

coding

#

😎

hearty wind
#

pulse you have to actually do work lol

#

if u cant google you fucked when it comes to coding

hazy blade
#

can some one help me

sudden geyser
#

mlem what is Command

flint python
#

Then can someone do it for me lamo I'm trying to make a tea. Sever

#

Team*

hearty wind
#

nope

hazy blade
#

weather

hearty wind
#

nobody is gonna code for you man.

#

unless they bored as fuck with no other option lol

old pilot
#

yeah sorry dude

hazy blade
#

mlem what is Command
@sudden geyser const weather = require('weather-js');
const discord = require('discord.js')
const Command = require('../Command.js');

module.exports = {
name: "weather",
description: "Weather of City",
usage: "weather",
category: "utility",
run: async (bot, message, args) => {
if (!args.length) {
return message.channel.send("crosss | Please give the weather location")
}

    weather.find({ search: args.join(" "), degreeType: 'C' }, function(err, result) {
        try {

            let embed = new discord.MessageEmbed()
                .setTitle(`Weather - ${result[0].location.name}`)
                .setColor("#ff2050")
                .setDescription("Temperature units can may be differ some time")
                .addField("Temperature", `${result[0].current.temperature} Celcius`, true)
                .addField("Sky Text", result[0].current.skytext, true)
                .addField("Humidity", result[0].current.humidity, true)
                .addField("Wind Speed", result[0].current.windspeed, true) //What about image
                .addField("Observation Time", result[0].current.observationtime, true)
                .addField("Wind Display", result[0].current.winddisplay, true)
                .setThumbnail(result[0].current.imageUrl);
            message.channel.send(embed)
        } catch (err) {
            return message.channel.send("![crosss](https://cdn.discordapp.com/emojis/732467550222286868.webp?size=128 "crosss") | Unable To Get the data of Given location")
        }
    });

}

}

old pilot
#

it’s always fun to learn tho

hearty wind
#

people dont wanna learn

sudden geyser
#

that's not really what it is

hazy blade
#

is a weather commands

sudden geyser
#

Go to src\Client.js, line 139 at column 25

#

That's where your error is coming from.

#

I assume that's some sort of command handler.

copper cradle
#

What's 'Command'

#

where did you define that class

hearty wind
#

so anyone got an idea..... on that poll idea....

copper cradle
#

or are you using a custom built command handler

#

that you made or got from google

hazy blade
sudden geyser
#

this may be the issue.

hazy blade
#

how to fix

sudden geyser
#

1. You're trying to declare another const variable as the same name. You can't do that with const.
2. It seems you're trying to export an object in your class; not a class called Command. Using the new keyword on it does not make sense.

copper cradle
#

he isn't

#

one is named Command and the other one is command

#

the C is not equal

#

and js is case sensitive

sudden geyser
#

ah I thought I read them both as the same

copper cradle
#

the problem is

#

that Command is not a constructor

#

where did you get that code from

#

that seems like a complex system

hazy blade
copper cradle
#

so you copied it and expected it to work right out of the box

hazy blade
#

oh

#

so you have any commands of weather

digital ibex
#

can anyone help me with this, js console.log(lost.getUser(req.user.id) .then((e) => { console.log(e); return e; }).then((e) => { console.log(e); }).catch((e) => { console.error(e); })); its returning undefined for some reason... no idea why

copper cradle
#

@hazy blade yeah no, nobody will give you code like that, learn to code, you'll see it isn't even half hard

hazy blade
#

ok

earnest phoenix
#

@digital ibex you can't just directly log a promise to the console, because the meaning of promise would be useless there

#

You resolve the promise first then log

#

Not directly log a promise

digital ibex
#

yeah

#

but e is a promise tho

earnest phoenix
#

e is not a promise, it's the resolved response of the promise that you resolved

ancient falcon
#

@hazy blade what is with this code its so complicated for something so simple

earnest phoenix
#

@old pilot by an eval obviously

ancient falcon
#

what if ur language doesnt have evals

earnest phoenix
#

Uhh, you don't have to use eval() in every language to evaluate something I'm pretty sure

zinc condor
#

Just got pagination working and its an optional thing for the help command with the handler. Also I replaced the discord permission system for command access with something like minecraft plugins. Am proud

#

Am using Go with a custom library i made :p

ancient falcon
#

pagination is pretty easy with dpy tbh

zinc condor
#

yeah i dont use dpy, i wrote my own library and everything

#

made in Golang

ancient falcon
#

ah

earnest phoenix
#

Is it bad that i literally see nothing more than a pitch black screen on the video you sent @zinc condor

ancient falcon
#

it is bad

zinc condor
#

it is bad

#

hmm

ancient falcon
#

dont you just have to handle the events and send a few post requests to add the reactions

earnest phoenix
#

The thing is i made a function for js users to make pagination more easier, currently 30 people using it

zinc condor
#

yeah mostly, mine does timeouts when you dont react in a certain time limit and a fast travel one so it keeps each embed in a slice and just traverses it

earnest phoenix
#

It's a function tho

ancient falcon
#

rapptz made one for dpy but uhhh (it kinda sucks ngl)

earnest phoenix
zinc condor
#

KEKW its a bit harder when you are more low level
but yeh i remade permission system in minecraft so its like

+akko.general.help - help command permission
-akko.general.* - disable access to all general permissions

so yeh i think its nicer

earnest phoenix
#

I am a botemoji_43

zinc condor
earnest phoenix
#

(This turned into a off-topic chat, move to #general)

zinc condor
#

fair

ancient falcon
#

I was about to say exactly that "fair"

earnest phoenix
#

this is not discord related but when i try to print a custom font like this --> print("𝙈𝙖𝙜𝙣𝙪𝙨 𝙎𝙬𝙖𝙥 𝙏𝙪𝙧𝙗𝙤") it comes up like this:

#

any idea how to fix it? python btw..

ancient falcon
#

download the font?

earnest phoenix
#

what

#

that makes no sense whatsoever

#

its a copy and paste custom font dude

ancient falcon
#

oh is that not on an editor

earnest phoenix
#

no

#

its this

ancient falcon
#

I think you have to change your locale to utf8 unicode

#

i assume its linux

earnest phoenix
#

no

#

im on windows

ancient falcon
#

ah then i have no clues how that works

earnest phoenix
#

Ite

earnest phoenix
#

Heyo how do i upgrade from discordjs 6 to discordjs 12?

#

@earnest phoenix your console font doesn't support it

#

use windows terminal and it'll probably show up

#

if you want fancy fonts in the console just use ascii art

#

@earnest phoenix rewrite the whole thing

#

Oh

#

Uh

#

Ok

flint python
#

Can someone join my sever so ik if my bots are working

brittle horizon
#

I need help

#

I want to change my bot token in top.gg

flint python
#

Correctly

earnest phoenix
#

@flint python make an alt

brittle horizon
#

...

#

Nvm

flint python
#

@brittle horizon

#

Can you join my discord sever to see if my bots are working

earnest phoenix
#

literally just make an alt

#

gUyS pLeAsE jOiN mY sEvEr

#

i NeEd TeSt BoT

digital ibex
#

does anyone know why im getting this error? { message: '400: Bad Request', code: 0 }

#

what im doing is await lost.editNickame(guild.id, req.body.nickname);

#

the editNickname method: ```js
async changeNick(guildID, newNickname) {
const fetch = require('node-fetch');
const nick = await fetch(https://discord.com/api/guilds/${guildID}/members/@me/nick, {
method: 'patch',
headers: { 'Content-Type': 'application/json', Authorization: Bot ${process.env.CLIENT_TOKEN}}
}).then((e) => e.json());
return nick;
}

copper cradle
#

b e a r e r

#

that's not the body they want

#

did you check the docs?

digital ibex
#

instead of authorization?

#

yes

copper cradle
#

instead of Bot

digital ibex
copper cradle
#

Bearer <token>

digital ibex
#

oh

copper cradle
#

wait

digital ibex
#

bot has worked before

#

but catshrug

copper cradle
#

did you check the payload they want?

digital ibex
#

a string?

copper cradle
#

no

#

the body you're sending

#

is it what they want?

digital ibex
#

it doesn't say

copper cradle
#

then why are you sending that

#

I'll try to find something

#

but I've got to finish my homework for tomorrow

digital ibex
#

oh ok

#

for clarification, its the 'Content-Type': 'application/json' ?

copper cradle
#

maybe try with x-www-form-urlencoded

digital ibex
#

kk

copper cradle
#

well I've never interacted directly with the discord api actually

#

so why don't you check how they do it in d.js

digital ibex
#

oh

#

good idea

#

if this doesn't work anyways

#

lol

#

to d.js's source code i go

#

ok no

#

to eris' source code i go

earnest phoenix
#

you have nothing in the body

digital ibex
#

i did

earnest phoenix
#

unless im blind that code doesn't define the body anywhere

digital ibex
#

what i done was js headers: { 'Content-Type': 'x-www-form-urlencoded', Authorization: `Bot ${process.env.CLIENT_TOKEN}`}

earnest phoenix
#

that isn't the bod

#

body

#

"

digital ibex
#

oh im stupid

earnest phoenix
#

also the content type does need to be app/json

digital ibex
#

oh

#

i thought that sends it in a json format

earnest phoenix
#

yes

#

and if you look back at the docs it asks for json params

#

you send a json object in the body

digital ibex
#

o ok

#

i done js method: 'PATCH', headers: { Authorization: `Bot ${process.env.CLIENT_TOKEN}` }, body: { 'Content-Type': 'x-www-form-urlencoded' } am i not doing it correctly?

#

it says the same thing

copper cradle
#

application/json

earnest phoenix
#

what

digital ibex
#

kk

earnest phoenix
#

content-type is a header

copper cradle
#

tbh I needed something to say to get out of here lmao

earnest phoenix
#

why are you sending it in the body

copper cradle
#

yeah lmao

#

that's not how you should send that data

digital ibex
#

o

#

what do i put as the body then

#

im confused

earnest phoenix
#

look at the docs

copper cradle
#

the nick

#

it literally says

earnest phoenix
#

a simple json object with a nick property

copper cradle
#

yes

#

I can't type today

#

fuck

digital ibex
#

so ```js
async changeNick(guildID, newNickname) {
const fetch = require('node-fetch');
const nick = await fetch(https://discord.com/api/guilds/${guildID}/members/@me/nick, {
method: 'PATCH',
headers: { 'Content-Type': 'application/json', Authorization: Bot ${process.env.CLIENT_TOKEN} },
body: { nick: newNickname }
}).then((e) => e.json());
return nick;
}

earnest phoenix
#

tias

#

although im p sure body has to be a string

copper cradle
#

it is

#

as long as they pass a string as the second param

earnest phoenix
#

lol

digital ibex
#

{ message: '400: Bad Request', code: 0 } same thing

earnest phoenix
#

your body has to be a string

copper cradle
#

oh yeah

#

lol

vapid jacinth
#

How to implement discord rich presence on android app

copper cradle
#

the body itself

digital ibex
#

yeah, his is what idoen

copper cradle
#

not the nick param's value lmao

digital ibex
#

await lost.changeNick(guild.id, req.body.username);

copper cradle
#

not that

digital ibex
#

?

earnest phoenix
#

How to implement discord rich presence on android app
@vapid jacinth i'm pretty sure you can't, rp on android is limited to a few verified apps

copper cradle
#

JSON.stringify({ nick: newNickname })

#

That

digital ibex
#

oh ok

copper cradle
#

that's what you want as the body

#

the body itself must be a string

#

remember that the JSON object exists

#

and it has a lot of useful methods

#

such as stringify

earnest phoenix
#

for a simple object like that just construct the string yourself, stringifying objects is slow

copper cradle
#

yeah

#

use a template literal

#

or use the old way

#

fuck

digital ibex
#

i done

#
    const nick = await lost.changeNick(guild.id, req.body.username);
    console.log(nick);
#

and it logs { nick: null }

earnest phoenix
#

then you sent null as your nick

digital ibex
#

i put hi, lemme try again

earnest phoenix
#

log your variables, don't guess

digital ibex
#

h

#

yeah

#

its req.body

#

oh 🤦‍♂️

#

i put username instead of nickname

stable nimbus
#

Does anyone here use MySQL?

#

(Please @)

sonic lodge
#

@stable nimbus yes, what do you need help with

stable nimbus
#

@sonic lodge I got things rolling so far, but I need help mainly getting the command to be a toggle, do you use js?

sonic lodge
#

i do, and wdym a toggle?

stable nimbus
#

So I want the command to create an entry if it doesn’t exist, and to remove it if it does.

#

Do you mind if I dm?

sonic lodge
#

sure

earnest phoenix
#

How do I make a reaction role code?

#

I'm trying to make a code for it but I'm unsure

ancient falcon
#

what language

earnest phoenix
#

Node.JS

#

NPM

ancient falcon
#

no clues

earnest phoenix
ancient falcon
#

no your in the right channel @earnest phoenix

earnest phoenix
#

Oh! Ok!

jolly quail
#

What r u thinking of doing @earnest phoenix

earnest phoenix
#

Like I'm trying to do reaction roles and all the codes don't make sense and the docs are either outdated

jolly quail
#

The process

digital ibex
#

on the messageReactionAdd event, look for x emoji, and if it is x emoji, add the role

ancient falcon
#

check for the message too lol

jolly quail
#

U have to get the emote and map it to the role id and then whenever a user reacts on that message u have to use addRole

#

I guess

ancient falcon
#

and also check if you have permission or it will error

earnest phoenix
#

Ok thanks! Its for a server that I'm using--

jolly quail
#

Hmm see how a bot uses reaction roles first @earnest phoenix

#

Maybe yui bot

#

That'll give u an idea

ancient falcon
#

its pretty simple to be honest

jolly quail
#

Yep

earnest phoenix
#

Its sometimes hard to code but I use things like Carl-Bot and Reacton Roles

jolly quail
#

I mean decide on the process how u wanna add the reaction role command.. Like how u will get emotes and role id from user

#

What message will be displayed

#

etc.

ancient falcon
#

You can just have a json where you have

message_id: {
reaction_emote: role_id
}```
#

simplest way

jolly quail
#

Yeah

#

And message_text

#

Or whatever u wanna add

#

First u get all that then code the action when user reacts on that message

regal jacinth
#

he so
yesterday i wrote about my problem here
and it was about my bot going online and offline continuously after being approved
i am hosting in heroku for free
so i downloaded the file from GitHub and run in local
so idk y but the bot is online
but no command works
also there isn't any on_ready messages in the terminal

lusty quest
#

its possible that the bot is rate limited

regal jacinth
#

wdym?

lusty quest
#

listen to the debug event and see if your bot got ratelimited

regal jacinth
#

okay

lusty quest
#

if you bot constantly tryed to relogin its possible that the API locked you out bcs of spamm

regal jacinth
#

Connected to pydev debugger (build 183.6156.16)
``` but i don't remember spamming
lusty quest
#

if you bot was running over night and something caused it to constantly try to login again it can cause it (happened to me once)

regal jacinth
#

oh

#

yeah that's exactly what happened

#

so how did u solve it

lusty quest
#

you have to wait for up to 12 hours. and Ive added a limitation about how many times pm2 tryes to login again and added a delay of 10 seconds between the logins

regal jacinth
#

man it has been 2 days since then

#

also how to add those limitations?

lusty quest
#

does the console say its ratelimited?

regal jacinth
#

empty

lusty quest
#

this depends on your code and if you use pm2 for running node stuff

regal jacinth
#

i am using python

lusty quest
#

then idk

regal jacinth
#

oh okay
thank you

lusty quest
#

did you login after your client got logged out?

regal jacinth
#

wot?

lusty quest
#

you could add a delay between the logins

#

you can login the client after it got logged out

regal jacinth
#

in the bot? or heroku ?

lusty quest
#

the bot

#

also heroku is crap

regal jacinth
#

oh
idk how to do it

#

ik

#

can't offer money rn

lusty quest
#

if you got a credit card Amazon AWS offers 1 year free for a small VPS

#

or Google also offers a Free VPS

regal jacinth
#

but google is slow

lusty quest
#

well the free VPS is not the most powerfull in the world and limited to the Host Region US

regal jacinth
#

oh

#

so i just got the ready messages but no command works

#

and the bot goes online and offline too (ping me if u can help me please)

earnest phoenix
#

Is there a JavaScript function that rounds up the decimals and only keep it’s tenths? Because sometimes I add a number by 1.3 and it becomes like 2.99999999999997 for no reason.

pale vessel
#

round them up then

earnest phoenix
#

nvm i found out about .toFixed()

#

sounds like someone discovered IEEE754

stiff stream
#

hey

#

someone know how i make that if someone do the command and dont write anything after that the bot wont crash?

#

??????

earnest phoenix
#

?

pure lion
#

😳

stiff stream
#

someone know how i make that if someone do the command and dont write anything after that the bot wont crash?
@stiff stream

pale vessel
pure lion
#

^

stiff stream
#

where?

pale vessel
#

you should use args

pure lion
#

Definitely

pale vessel
#

you can easily check them

pure lion
#

And don't do some weird gay split method it's just ' '

#

Like the fuck is a / +g/

#

Or whatever that weird youtuber guy who everyone watches and is a noob does

pale vessel
#

so that "hi yes" becomes ["hi", "yes"] and not ["hi", " ", " ", " "..., "yes"]

stiff stream
#

@pale vessel

someone know how i make that if someone do the command and dont write anything after that the bot wont crash?

inner quarry
#

also heroku is crap
@lusty quest
Yeah. The free Dyno hours thing.

stiff stream
#

i want it that if someone dont say anything after that it will respond

inner quarry
#

And the paid versions are expensive.

pale vessel
#

check the message content first or use args

stiff stream
#

idk how

#

can you make it for me?

#

please

#

want me to send you the command?

pale vessel
#

unfortunately i can't, nor will i

#

it's okay

stiff stream
#

?

jolly quail
#

Just do a timeout and return from the function after that @stiff stream

clever vector
#

anyone can help me make anti spam and link?

stiff stream
#

@jolly quail how do i make timeout function?

jolly quail
#

Uhmm

#

Language?

stiff stream
#

i forgot

#

how do i make the time out

jolly quail
#

I can only help with js

stiff stream
#

i have js

#

i use*

jolly quail
#

setTimeout()

stiff stream
#

k

jolly quail
#

Read the docs

#

for more info

stiff stream
#

just setTimeout()?

clever vector
#

@jolly quail can you help me make the anti link and spam

#

@stiff stream .setTimeout()

stiff stream
#

like 1000 is 1 sec right?

jolly quail
#

setTimeout(function,time in ms)

#

Ya

#

Just read the docs

#

Whole function would have to be put inside settimeout

stiff stream
jolly quail
#

@clever vector idk..

stiff stream
#

i put that there?

jolly quail
#

Nah

stiff stream
#

lost line

jolly quail
#

Not like that

stiff stream
#

so how?

jolly quail
#

Just see the docs

#

Of setTimeout()

stiff stream
#

k

bold nexus
#

like 1000 is 1 sec right?
@stiff stream yes

jolly quail
#

Time is mostly specified in ms so Yeah

bold nexus
#
setTimeout(function () {

    }, 3000);```
jolly quail
#

setTimeout(function,time in ms)
@jolly quail

stiff stream
jolly quail
#

Hmm

#

Wait for response

#

If don't get any

#

Then use that

bold nexus
#

@jolly quail thats will work too right?
@stiff stream why not

jolly quail
#

I mean where exactly will u put that line

#

Hmm

#

@stiff stream worked?

stiff stream
#

no

#

want to see the command?

jolly quail
#

I was thinking like declare a variable x and set to 0.. If u get a response.. Set it to 1

stiff stream
#

ok

jolly quail
#

Inside the settimeout check if x is 0

stiff stream
#

let me try

jolly quail
#

And if it is then return that message

#

That's what i was thinking

stiff stream
#

wait let me change the arg[0] to 1

jolly quail
#

Idk how much u got out of what i said xD

#

Well it's just my solution... U can ask others if u want

#

Cuz i gtg

#

Cya

stiff stream
#

bye (btw now its working great. i just changed it to 1)

#

ty anyway

earnest phoenix
#

how do i get the guild name?

stiff stream
#

the first one is for name

#

and second for server logo

#

@earnest phoenix

earnest phoenix
#

ok

#

thx

#

wait message.guild.iconURL returns the icon too? cool

delicate shore
#

my error

#
 if(command === "pokemon"){
   const { get } = require("request-promise-native");
const { MessageEmbed } = require("discord.js")
  const args = msg.content.split(" ");

let pokename = args[1].slice.join("")

const options = {
  url: `https://courses.cs.washington.edu/courses/cse154/webservices/pokedex/pokedex.php?pokemon=${pokename}`,
  json: true
  
}

msg.channel.send("Fetching Informtion for API").then(msg => {
  get(options).then(body => {
    
    let embed = new MessageEmbed()
    .setAuthor(body.name, `https://courses.cs.washington.edu/courses/cse154/webservices/pokedex/${body.images.typeIcon}`)
    .setDescription(body.info.description)
    .setThumbnail(`https://courses.cs.washington.edu/courses/cse154/webservices/pokedex/${body.images.photo}`)
    .setColor("#ff2050")
    .setFooter(`Weakness of pokemon - ${body.info.weakness}`, `https://courses.cs.washington.edu/courses/cse154/webservices/pokedex/${body.images.weaknessIcon}`)
    
    msg.channel.send(embed)
    msg.delete()
  })
})


  }
                                                    ```
#

code

stiff stream
#

try arg[0]

delicate shore
#

i did

earnest phoenix
#

@delicate shore use hastebin man

#

try arg=2

delicate shore
#

it then says pokemon is not a pokemon

#

it takes my command as the pokename

earnest phoenix
#

MessageDeleted}) .tygey 3}

delicate shore
#

oh

#

i forgot to split

#

the msg

#

first

stiff stream
#

why is not deleting the you need to type the announcement that you want to send. after 3 seconds?

#

?

restive pebble
#

Djs v12?

#

@stiff stream

stiff stream
#

yes

jolly quail
#

Hmm

#

Ur deleting which message exactly

#

The message u sent and message.delete are different messages

stiff stream
#

theyou need to type the announcement that you want to send.

#

tes

#

yes they are

fresh hatch
#

@stiff stream i will only delete the message you send

earnest phoenix
#

why is not deleting the you need to type the announcement that you want to send. after 3 seconds?
@stiff stream wtf that is deleting a message called 3000 and not wating 3000 seconds and deleting KEKW

stiff stream
#

ohhhh

earnest phoenix
#

uuse setTimeout

#

lemme type it out

stiff stream
#

k

#

k

#

ty

earnest phoenix
#

NO SPOONFEEDING I WILL DO

fresh hatch
#
.then((message) => {
        setTimeout(function() {
        message.delete()
      }, 3000)})
``` i think this will do
earnest phoenix
#

3000

#

put that

stiff stream
#

ty

fresh hatch
#

np