#development

1 messages Β· Page 1837 of 1

tired panther
#

Lol

earnest phoenix
#

What is discord-js-light

tired panther
#

Sarcasm...

quartz kindle
#

nope, never heard of it :^)

earnest phoenix
#

I only know discord.js-light

rose warren
#

It's a discord.js lib that forces light mode in channels your bot is in

sonic lodge
#

actually i'm just stupid, bot.channels.cxache is indeed getting updated, mb

quartz kindle
earnest phoenix
#

That sounds painful

sterile thicket
#

Yes that worked well

#

thanks Tim and Misty

boreal iron
#

@quartz kindle Aren't you using node-fetch, too?

quartz kindle
#

like in general?

boreal iron
#

In general, yeah

#

failed, reason: unable to verify the first certificate

quartz kindle
#

not much

boreal iron
#

looks like it doesn't like LE certs

proven lantern
quartz kindle
#

xD

earnest phoenix
#

Why thank me

#

I didn't do anything

hot sleet
#

client.on('interactionCreate'.....
what is interaction in this?

earnest phoenix
#

Que

quartz kindle
boreal iron
#

Yeah

quartz kindle
#

it should work, i dont see why it wouldnt work

boreal iron
#

No issues with any other service fetching my endpoint.

#

Just nodejs.

#

Not even using openssl to test contacting the endpoint

#

wtf

quartz kindle
#

weird

boreal iron
#

got through that already

#

I'm out of ideas

quartz kindle
#

is your server running on node directly or a reverse proxy?

hot sleet
#
client.on('interactionCreate', async interaction => {
  console.log(interaction)
});```
what do interaction triggers ?
all messages or what ?
quartz kindle
hot sleet
#

in that code it didn't log anything when i typed /help

quartz kindle
#

did you register the command?

hot sleet
#

....

quartz kindle
#

slash commands have to be registered

hot sleet
#

oh

#

ok can i change / to anything ?

#

like .

quartz kindle
#

no

hot sleet
#

ok ty

#

i won't use it

quartz kindle
#

you will have to in the future

boreal iron
quartz kindle
hollow depot
#

hi, i was reading the discord.js change log to v13, what does ephemeral message mean?

#

ok no i'm just dumb, i just figured out

quartz kindle
hollow depot
boreal iron
hot sleet
#

cmd.run(client, message, args);

#

this was working

#

and still working on discord1.12

#

i get this in discordv1.13 TypeError: cmd.run is not a function

#

TypeError: cmd.execute is not a function
i used execute as discord.js guide
same error

quartz kindle
#

thats not a discord.js issue

#

thats your own code

hot sleet
#

so what's the problem ?

quartz kindle
#

you should know lol, its your code

#

how does your command handler work?

#

how do your command files run?

#

what is the name of the function that executes the code inside the command?

hot sleet
#
  client.commands = new Collection();


let prefix = ("/");


const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));

for (const file of commandFiles) {
    const command = require(`./commands/${file}`);

  console.log(file + ": Loaded.")
  client.commands.set(command.name, command);
}


//---------------------------------------------------



client.on('messageCreate', message => {
  if (message.channel.type == 'dm' && message.content.startsWith(".help")) return message.channel.send("Don't use bot commands here, use servers instead")
  if (message.channel.type == 'dm') return;  
  
  if(!message.content.startsWith(prefix))return;
if (message.author.bot) return;    

  let messageArray = message.content.split(" ");
  let command = messageArray[0];
  let args = messageArray.slice(1);
  let cmd = client.commands.get(command.slice(prefix.length));
  if (cmd) {
 
    
  cmd.run(client, message, args);
  console.log("(" + command + ") command just used in " + message.guild.name + " server")

}
});```
#
    name: "help",
}```
#

the same code work in my old version bot

#

not the 100%same one btw

earnest phoenix
#

well

#

you should be using run

#

not execute

quartz kindle
hot sleet
#

this module.exports.run = async (client, message, args) => {

#

?

earnest phoenix
#

where is execute coming from then

quartz kindle
#

if you have module.exports.run then its cmd.run

earnest phoenix
#

Yea

quartz kindle
#

check if all your command files have run

hot sleet
#

im using cmd.run

#

reread my code

earnest phoenix
#

Make sure none of your commands are using execute instead of run though

quartz kindle
#

or missing a run function

earnest phoenix
#

Yea

hot sleet
#

they all have .run

#

and still have the problem

earnest phoenix
#

Then im confused where execute is even coming from

quartz kindle
#

add console.log(cmd) right before cmd.run()

earnest phoenix
#

Ah wait I se now I didn't read the entire situation mmLol

quartz kindle
#

and show what it logs

hot sleet
#

i got {name : "help"}

quartz kindle
#

then the function is missing, or you removed it

#

in what order did you define the module.exports lines?

#

which one first?

hot sleet
#

this module.exports.run = async (client, message, args) => {

quartz kindle
#

if that one is the first one, then thats the issue

#

you are removing it in the next line

#
module.exports.a = 10; // create an "a" property
module.exports = {}; // redefine the object with a new value. this removes all properties
module.exports.a // undefined
hot sleet
#
const Discord = require("discord.js");
const fetch = require("node-fetch");
const fs = require("fs");

module.exports.run = async (client, message, args) => {

 console.log("....hi")


}

module.exports = {
    name: "help"
}```
quartz kindle
#

yes, you are removing it

hot sleet
#

this is my help.js

#

so ?

quartz kindle
#

did you understand the code i posted?

hot sleet
#

no

quartz kindle
#

you are removing the run function by overwriting module.exports with a new object

hot sleet
#

so what should i do

quartz kindle
#

dont overwrite it

#

do you know how variables work?

quartz kindle
#

no

hot sleet
quartz kindle
#

then you should learn, thats like super basic javascript

hot sleet
#

actually i know a little

quartz kindle
#

its not hard

hot sleet
#

is it like when i use
var data = "";
then later edit it using data = "new info"?

quartz kindle
#

basically yes

#

you are editing module.exports with new info

hot sleet
#

i got the point now

#

but why it works in my other code

quartz kindle
#

it shouldnt

#

do you still have your other code?

hot sleet
#

it work with this

fs.readdir("./commands/", (err, files) => {
    if(err) console.error(err);

    let jsfiles = files.filter(f => f.split(".").pop() === "js");
    if(jsfiles.length <= 0) {
        console.log("No commands to load");
        return;
    }

    console.log("loading " + jsfiles.length + " commands!");

    jsfiles.forEach((f, i) => {
        let props = require("./commands/" + f);
        console.log(i + 1 + " : " + f + " loaded")
        client.commands.set(props.help.name, props);
    })

});```
quartz kindle
#

thats not the issue

#

the issue is inside the command file

hot sleet
#

yep

#

but as i said how it works with that code

brave garnet
#

πŸ”₯
someone know how to make mentioning member optional? (discord.py) for the now source i have:

@bot.command()
async def stat(ctx, member: discord.Member)
quartz kindle
#

it will not work with this code if you dont change the other code

hot sleet
#

my bot is working with it as i said and it's online working fine now

quartz kindle
#

then your command file is also different

#

or you didnt restart your bot after you changed it

hot sleet
#

just a sec

quartz kindle
#

if it works, then your files are different from what you posted

#

or you posted the wrong file

hot sleet
boreal iron
#

#development message

Why even building it so complicated?

module.exports =
{
    name: "command",
    async run(...)
    {
        ...
    }
};
hot sleet
#

i just edited it and guess what...
it's not working with ,

#

also not working with other commands

quartz kindle
#

???

#

what ,?

boreal iron
#

Not the , is the issue

hot sleet
#

i know

#

tell him

boreal iron
#

I think you don't get what the issue is.

hot sleet
#

tim do you mean .help

quartz kindle
#

i mean your module.exports lines

hot sleet
#

oh

#

so wait

boreal iron
#

module.exports.help is NOT module.exports

hot sleet
#

oh

#

wait

quartz kindle
#

let me see if i can explain in a way that you will understand

#

module.exports is a box
when you do module.exports.something = somethingElse, you are creating an item something, inside the existing box.
when you do module.exports = something, you are creating a new box and giving it to module.exports, and replacing the old box. the old module.exports box is deleted, along with all items inside of it

winged juniper
#

Why i have error in user.presence.status in discord.js v13

hot sleet
#

i got it

#

ty

#

you really helped me so much

brave garnet
pale vessel
#

Try member: discord.Member = None

brave garnet
#

k

earnest phoenix
brave garnet
#

nope. didnt worked. i use a thing which need user. none returns none (possible with author ?)

earnest phoenix
#

and what exactly is this error

brave garnet
#

anyways - went to 0% better to shoutdown pc bye

signal estuary
#

I have a problem. I want to set the valuable default as "not set". But if there is something in the database the valuable changes to the valuable which is stored in the data base. But the result arrives a few ms later so I will always get "not set". How can I fix this (resolve)?

quartz kindle
#

you have to use promises

vivid fulcrum
#

there are so many wrong things in that snippet

sour cargo
#

opps sorry wrong server

#

i have the following code

    if message.content.lower().startswith("=tag"):
        guild = client.get_guild(670368584220016641)
        usersList = guild.members
        print(usersList)

but the code only returns the bot in the list

[<Member id=709498755136618527 name='The Brickyard Bot' discriminator='0465' bot=True nick=None guild=<Guild id=670368584220016641 name='The Brickyard' shard_id=None chunked=False member_count=922>>]

not sure why I'm getting back only the bot, and I double checked the numbers for client id

quartz kindle
#

only the bot member is cached by default

#

unless you have the GUILD_MEMBERS and GUILD_PRESENCES intent

earnest phoenix
royal herald
#

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider;

#

hmmm

#

werid

compact jay
#

Wth is that

royal herald
#

java

compact jay
#

Oh

compact jay
#

Very ez looking πŸ˜€

royal herald
#

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/bumptech/glide/gifdecoder/GifDecoder$BitmapProvider;
at com.bumptech.glide.Glide.<init>(Glide.java:409)
at com.bumptech.glide.GlideBuilder.build(GlideBuilder.java:563)
at com.bumptech.glide.Glide.initializeGlide(Glide.java:314)
at com.bumptech.glide.Glide.initializeGlide(Glide.java:266)
at com.bumptech.glide.Glide.checkAndInitializeGlide(Glide.java:210)
at com.bumptech.glide.Glide.get(Glide.java:191)
at com.bumptech.glide.Glide.getRetriever(Glide.java:774)
at com.bumptech.glide.Glide.with(Glide.java:801)
at com.marsbrowser.ashpotter.app.HavadurumActivity.initializeLogic(HavadurumActivity.java:99)
at com.marsbrowser.ashpotter.app.HavadurumActivity.onCreate(HavadurumActivity.java:69)
at android.app.Activity.performCreate(Activity.java:8207)
at android.app.Activity.performCreate(Activity.java:8191)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3782)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3985)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2309)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:246)
at android.app.ActivityThread.main(ActivityThread.java:8577)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
Caused by: java.lang.ClassNotFoundException: com.bumptech.glide.gifdecoder.GifDecoder$BitmapProvider
... 25 more

rare mist
royal herald
#

i did

rare mist
royal herald
#

the code:

Glide.with(getApplicationContext()).load(Uri.parse("https://wttr.in/".concat(edittext1.getText().toString().concat("_0tqp_lang=tr.png")))).into(imageview1);
queen rose
#

how do you guys get the number of votes at top.gg is it possible? how u do it

queen rose
#

oh thank you

royal herald
rare mist
#

Well i dont wanna be captain obv but there is a missing class that java cannot find, try changing the compiler

royal herald
#

its aapt2

errant python
#

So I'm working on adding tts/easy for screen reader commands for each of my regular commands via a "tts" option - is it possible to direct the tts to only the one requesting the command

#

If not, that's fine, I just couldn't find anything in the api about it

#

for example I currently have it like so:

#

I know people can disable tts client side, but it is on by default

#

Unfortunately with the introduction of slash command only requirements it becomes difficult for any accessibility software to use bots correctly

split hazel
#

I mean that's ultimately for discord to really figure out not us

#

they are working on their screen reader though I think

#

we don't exactly get much freedom

errant python
#

True, they have stated they halted the accessibility program though

#

They have 1 solo developer handling it, no team anymore, no input from real users

#

Kinda stupid

slender thistle
#

Just Discord things

hot star
#

I know this is not place to get help with this but still,

I got locked out of my heroku account and I can't access my 2FA codes and need heroku team to remove 2FA from my account I mailed them but still no reply from them it's been 5 days

If you know someone from heroku team that can help me with this DM me thank you

pale vessel
#

Lesson learned: always take a backup

hot star
hot star
#

Don't open its scam link

crystal wigeon
#

hey umm

#

the DBLwebhook

#

where does it send the authorization?

#

in req headers?

solemn latch
#

yes

earnest phoenix
#

I was using message.author for tag message author but it doesnt work on v13 what they changed?

wheat mesa
#

Use message.author.tag

#

Wait

earnest phoenix
#

Then it will say tyone#9999

wheat mesa
#

I don’t think that was your question never mind

earnest phoenix
#

Not @earnest phoenix @earnest phoenix

wheat mesa
#

Yeah I thought you meant you were trying to get the tag of the user

#

I don’t use djs anymore, so nevermind lol

zenith terrace
#

just do <@${message.author.id}>

lethal trout
#

How can I add pictures in java bluej?

cinder patio
solemn latch
#

isnt that considered bad practice?

cinder patio
#

why would it be a bad practice?

zenith terrace
solemn latch
#

assuming an object will give a correct response when stringifying it
I was under the impression that was never correctly supported by nodejs.

cinder patio
#

template literals use an object's .toString method

earnest phoenix
solemn latch
#

was less a nodejs issue rather a discordjs issue. rather than fixing it they just make you do it now? πŸ‘€

earnest phoenix
#

discord being discord
djs being djs

last tapir
#

and shit being shit

feral aspen
#

What?? πŸ˜‚

pale vessel
#

Discord is shit

last tapir
#

so as their changes lmao

boreal iron
#

fuck... DiscordAPIError: Max number of daily application command creates has been reached (200)
imagine you're trying to test something really hard and boom you're fucked KEKW

#

creates a new guild, after creating another guild ...

rose warren
feral aspen
#

Hello. πŸ‘‹

#

I have this code.

#
for (i = start; i < res.length; i++) {
    embed.addField(`${3 > i ? `${emojis[i]}` : ""} ${i + 1}. ${bot.users.fetch(res[i].userID)?.username ?? message.guild.members.cache.find(user => user.id === res[i].userID).username}`, `${Math.floor(res[i].workAmount).toLocaleString()}`);
    console.log(bot.users.fetch(res[i].userID));
};
#

You see.. I logged bot.users.fetch(res[i].userID).. and it returned an object but Promise before.. should I await it?

#
Promise {
  User {
    id: '528256079101034506',
    system: null,
    locale: null,
    flags: UserFlags { bitfield: 64 },
    username: 'HamoodiHajjiri',
    bot: false,
    discriminator: '9923',
    avatar: '28511586b01b7f82beb6688886bd2296',
    lastMessageID: '874220319005605898',
    lastMessageChannelID: '828625740773589102'
  }
}
#

For some reason... ${bot.users.fetch(res[i].userID)?.username} is returning undefined.

#

Did I do something wrong?

quartz kindle
#

yes, promises need to be awaited

feral aspen
#

Moment.

#

This is returning undefined.

console.log(await bot.users.fetch(res[i].userID).username);
zenith terrace
quartz kindle
#

you need to await the promise itself

#

not promise.username

feral aspen
quartz kindle
#

to*

feral aspen
#

Oh. I'm sorry.

quartz kindle
#

(await promise).username

feral aspen
#

Oh.

#

Let me check.

#
console.log(bot.users.fetch(await res[i].userID).username);
#

Like this, correct? It's returning, undefined.

quartz kindle
#

wat

#

no

#

res.userid is not the promise

#

fetch is the promise

zenith terrace
#

basically, fetch always returns a promise, so await should always go before fetch

feral aspen
#

.. so I created this.

#
const z = await bot.users.fetch(res[i].userID);
console.log(z.username);
#

Sorry for the late reply.

#

OH WAIT

#
console.log((await bot.users.fetch(res[i].userID)).username);
#

I figured it out. πŸ‘

quartz kindle
#

πŸ‘

feral aspen
#

Thank you. πŸ‘

trail finch
#
      ^

TypeError [CLIENT_MISSING_INTENTS]: Valid intents must be provided for the Client.
    at Client._validateOptions (D:\Coding stuffs\discord.js\endlessparaDOX1\node_modules\discord.js\src\client\Client.js:544:13)  
    at new Client (D:\Coding stuffs\discord.js\endlessparaDOX1\node_modules\discord.js\src\client\Client.js:73:10)
    at Object.<anonymous> (D:\Coding stuffs\discord.js\endlessparaDOX1\index.js:2:16)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12)
    at node:internal/main/run_main_module:17:47 {
  [Symbol(code)]: 'CLIENT_MISSING_INTENTS'```
#

I never had this error

#

so idk how to fix it

#

someone help AAA

#

and do ping me

#

ok I got it I got it

#

so they changed the code- DUDE ITS SO ANNOYING

waxen bough
#

rewrite time haha

trail finch
#

;-; yea

trail finch
#

I wanna die now

waxen bough
#

no don't

trail finch
#

WHY DID THEY CHANGE SO MUCH

long crow
#

It a good start reading the guides

trail finch
boreal iron
#

You aren’t forced to update.
If you wanna update any library, framework etc. you will always need to inform yourself about changes and make sure to adjust your code if needed.

quartz kindle
#

you aren't forced to update yet, but you will be in the future

long crow
#

Some of those changes are neccesary, while some not really, well like xID become xId. lolzer

quartz kindle
#

like xID become xId. lolzer
that took me a while to understand lmao

long crow
#

lol

quartz kindle
#

i thought you said xD xd lolzer

earnest phoenix
#

Is it possible to compare Discord emojis
A person reacts with πŸ˜„ and i want to compare it with :smile:

quartz kindle
#

discord doesnt send you :smile:

#

discord sends you a unicode version of the emoji

#

so you have to compare that

earnest phoenix
#

Okay topggPensive

#

you can send the message in a test server and scrape the emoji html tho

lunar cove
#

Can i get some hint how to make a command which tracks the amount of time left before you can vote again and send a reminder when the time is right ?
Would I need to store the timestamp in DB when user voted last time, or is there an alternative ?

digital ibex
#

just when a user votes, use a setTimeout which sends a message in 12 hours (i think thats the vote time)

#

something like

#
// listen to user vote 
 setTimeout(() => {
    <SendMessage>
}, 43200000)```
lunar cove
#

Ohh thanks, that's the way to go, I was going the wrong way superhappy
I was trying to avoid database since I'm not familiar with it and this helps.

digital ibex
#

i would use a database because if your bot restarts, it wont send

lunar cove
#

ohh, but won't it take too much memory on large server , can I avoid that ?

digital ibex
#

i dont think it'd be too bad

lunar cove
#

Ohh well I got to go with database then sadkitty
I will also need it to store amount of votes and reward with votes so was worried about space

digital ibex
#

it shouldnt be too bad

#

because its not that large

#

i just woke up like 5 minutes ago i cant explain anything

lunar cove
#

cool, thanks for the help

#

and good morning !!

digital ibex
#

πŸ‘

#

(good afternoon)

lunar cove
#

lol

hard vortex
#

I need a coder pls dm me

#

I have some issues

lunar cove
#

Well can't you post it here, why would anyone dm you ?

hard vortex
#

It's an error on my private bot

#

And this server is for

sinful belfry
#

you can ask for development related help here

lunar cove
#
  server1.post("/dblwebhook", webhook.listener(vote => {
  console.log(vote.user)
  client.channels.cache.get('766908428411994134').send({embed: {
        title: "<@${vote.user}> voted !!",
        fields: [{
            name: "Thank You for voting for us!!",
            value: "The Description"
        }]
    }});
}))```

So i'm getting this error ,can anyone please tell where I went wrong ?
sinful belfry
#

even with ur own bot/other stuff which is unrelated to top.gg

lunar cove
hard vortex
sinful belfry
#

so youll probably want to fetch the user or turn it into a mention

digital ibex
#

btw embed titles dont mention

sinful belfry
#

ah

sinful belfry
lunar cove
lunar cove
sinful belfry
#

` is for templating/inserting variable values within strings (i think that's what it's called)

digital ibex
#

ye and its not <@$id> its <@!id>

hard vortex
sinful belfry
#

single or double quotes are just plain text without any variables inserted

hard vortex
#

Can u helpe with this

#

So

#

And I don't know how to install module

sinful belfry
hard vortex
#

And which module

lunar cove
sinful belfry
#

yeah exactly

lunar cove
sinful belfry
#

you can turn it into a mention by adding <@ > around it

digital ibex
#

the ! is for nickname iirc

lunar cove
#

yeah

hard vortex
lunar cove
#

or

sinful belfry
# hard vortex

looks like youre trying to run a file that doesnt even exist

sinful belfry
hard vortex
#

It works

#

On my other bots

sinful belfry
hard vortex
#

But now it doesn't

lunar cove
# lunar cove or

like this works too javascript const user = "<@"+vote.user+">";

sinful belfry
#

should do

#

yeah

sinful belfry
digital ibex
#

thats not going to mention in the title still

earnest phoenix
#

the server.js file doesn't exist and replit wouldn't try to run it by default

hard vortex
earnest phoenix
#

.replit file skill issue

lunar cove
sinful belfry
sinful belfry
#

im assuming a file is a file

lunar cove
earnest phoenix
#

why are you trying to run it

lunar cove
earnest phoenix
lunar cove
hard vortex
#

...

earnest phoenix
#

your .replit file is trying to run server.js

#

make it run the correct file

hard vortex
#

Ok

hard vortex
#

And how to change it

earnest phoenix
lunar cove
#
  server1.post("/dblwebhook", webhook.listener(vote => {
  console.log(vote.user)
  const user = '<@'+vote.user+'>';
  client.channels.cache.get('766908428411994134').send({embed: {
        description: 'user voted !!',
        fields: [{
            name: 'Thank You for voting for us!!',
            value: 'The Description'
        }]
    }});
}))``` good to go now, right ?
hard vortex
earnest phoenix
#

Lmfao

hard vortex
#

It's a moderation bot

earnest phoenix
#

It's your bot

hard vortex
#

Yep

earnest phoenix
#

You should know which file to run

lunar cove
earnest phoenix
#

sus

sinful belfry
lunar cove
#

But then shouldn't they know that server.js is missing Think

earnest phoenix
lunar cove
earnest phoenix
lunar cove
#

Anyway you forgot to add server.js @hard vortex , add it and it should run fine hopefully

earnest phoenix
#

anyways by looking at their file structure it seems the entry point to their bot is index.js

earnest phoenix
#

they were trying to copy a tutorial for expressjs

#

which has absolutely nothing to do with discordjs

lunar cove
earnest phoenix
#

You dont need a server to keep repls online

lunar cove
#

I think you misunderstood me

quartz kindle
#

also doesnt need to be named server.js

lunar cove
#

yeah

earnest phoenix
#

ig they renamed it index.js

lunar cove
#

but general practice whatever

quartz kindle
earnest phoenix
#

@hard vortex edit replit file to run="node index.js"

lunar cove
#
replit

Hosting discord.js bots on repl.it ! This tutorial shows how you can host your discord bots on repl.it if they are built in node.js irrespective of whatever library you used. This tutorial is applicable for all discord.js and Eris bots. Just to ease things we'll be using the end product of this tutorial . What we'll be doing? Creat...

#

Yay, the mention is working, thanks starman and pro discord mod!!

digital ibex
#

mod*

lunar cove
#

Now comes the worst part, dealing with database on repl.it SadGirl

lunar cove
digital ibex
#

:)

modest maple
#

Why the fuck is javascripts event system so fucking complicated when it moves into multiprocessing notlikeduck

#

idek what to believe anymore the MDN docs or my linter having it marked as depreciated

lunar cove
#

Once I'm done testing and early development, I'm gonna shift to vps for sure

#

Btw can we host multiple bots on single vps ?

modest maple
#

yes

lunar cove
#

ok cool

modest maple
#

apprently browser.runtime.onMessage.addListener(foo); is depreciated

#

but addEventListener doesnt work

#

im just torn

#

im so torn

umbral lake
#

Its my code: js client.on('message', async message => { const bang = client.channels.cache.get("843098329293783070") if(message.author.id === client.user.id) return if(message.channel.id === "874213843356774430") { if(message.content === 'Un **joueur** vient de voter pour le serveur.') { return bang.send(`Un membre vient de voter sans noter son pseudo.`) } const no = message.content const pseudo = no.replace(' vient de voter pour le serveur.', '').replace('Le joueur ', '').replace(/\s/g, ''); db.add(pseudo, 1) const votes = db.get(pseudo) const msg = `Merci ` + pseudo + ` pour ton vote, tu as actuellement ${votes} votes !` bang.send(msg) } })
and I want to make a leaderboard with the name (pseudo) and the number of votes
how I do this?

quartz kindle
modest maple
#

do be my life

#

would probably help if i actually bothered to install something to register the web api properly

#

butttttt

amber thistle
#

any npm package for making markdown?

sinful belfry
amber thistle
#

markdown parser for user input

sinful belfry
amber thistle
#

aight

errant flax
modest maple
#

sucks to be a linter

signal estuary
#

How can I make a leaderboard with the user with the most level listed on the top.
json:

{
    "808771611070038046318101553233788930": {
        "xp": 0,
        "level": 9,
        "xpto": 1
    },
    "808771611070038046747426344568225904": {
        "xp": 0,
        "level": 1,
        "xpto": 1
    }
}

I want to get out of the json file the user with the heighest XP:

808771611070038046747426344568225904
= serverid: 808771611070038046 userid: 747426344568225904

And before you get mad: I just use the bot for a small server so I dont need a database

pale vessel
#

use - not >

#

b - a

tulip ledge
#

Also it’s an object

#

Not an array

#

So it’ll be .sort((a, b) => b.level - a.level)[0]

#

Actually

#

No

#

That wont work

pale vessel
#

You just said it's an object lmao

#

I thought you meant the whole object not the sort params

#

Object.entries()/Object.values()

tulip ledge
#

Object.keys(file).sort((a, b) => file[b].level - file[a].level)[0]

pale vessel
#

Object.entries(obj).sort(([, a], [, b]) => b.level - a.level)[0][0]

tulip ledge
#

Mhh, I didnt know u could do that

#

How does that work?

#

Deconstructing the array?

pale vessel
#

Ye

tulip ledge
#

Interesting I didnt think of doing that

rose warren
#

Anyone know of any JS packages that can do a local mysql dump and run on node v16? I use mysqldump right now but it looks like it doesn't work with node 16. I downgraded back to node 14 and it works. Problem is I need node 16 for local development.

earnest phoenix
rose warren
#

It manages to connect to the db, start the dump, but when the dump is finished and it goes to finish off the save, I get an error saying it can't find the file.

earnest phoenix
#

That's kinda strange

rose warren
#
[Error: ENOENT: no such file or directory, open './backups/backup-2021_08_09.sql.gz.temp'] {
   errno: -2,
   code: 'ENOENT',
   syscall: 'open',
   path: './backups/backup-2021_08_09.sql.gz.temp'
 }
earnest phoenix
#

fs problem?

rose warren
#

That's the error it gives at the end of the dump. I can see it dumping the file in the directory though. It makes the file and I can see the size growing. It's just when it hits the end of the process in node 16 it errors out. No issues in node 14

#

I tried updating the packages, no difference.

earnest phoenix
#

Maybe the package dependencies broke on v16

rose warren
#

Just the basic setup based off the example on the npm page. It doesn't really matter. I was just wondering if anyone had an alternative that would work with node 16.

errant flax
#

maybe node 16 fucked up the old packages misosface

earnest phoenix
#

Our Node.js v16 release didn't really have anything to do with that behavior, it seems like that error happens because the package renaming the file but not using the new name of the file at the attempt to compress the file

#

I'm not sure how it works on Node.js v14 tho, which is kinda strange rather

long crow
#

When updating new nodejs I always delete the whole node_modules

boreal iron
#

Fucking auto correct

rose warren
#

No

#

Could that be it?

boreal iron
#

Yes probably

drifting reef
#

why wont my code work ```py
@client.command(name="Pick", description="Pick your starter pokemon!")
async def pick(ctx, starter_pokemon):
with open('starters.json', 'r') as s:
starters = json.load(s)
if starter_pokemon.lower() not in starters:
await ctx.send("This is not a valid starter pokemon!")
return
with open('caught_pokemon.json','r') as f:
caught_data = json.load(f)
if ctx.author.id not in caught_data:
with open("caught_pokemon.json", "w") as e:
userid = f"{ctx.author.id}"
x = {userid:[]}
x[userid].append(starter_pokemon.lower())
starter_pokemon = starter_pokemon.capitalize()
await ctx.send(f"Congratulations! You have picked {starter_pokemon} as your starter pokemon!")
else:
await ctx.send("You have already started your journey!")

rose warren
#

I had it as

dumpToFile: './backups/backup-' + date + '.sql.gz',
earnest phoenix
#

Also yea you should always rebuild the packages you've installed after installing another Node.js version, but it wouldn't matter if you installed the package with Node.js v16

rose warren
#

Yeah I did rebuild the packages

boreal iron
#

Try to use the __dirname global

drifting reef
earnest phoenix
boreal iron
#

I don’t think you can dump a file to a relative path

#

Try the full path

rose warren
#

It worked on node v14 shrug

#

I'll give that a try

boreal iron
#

Sure oldEyes

rose warren
#

Ok it's running the dump on node v16 now. Gonna have to wait about 3 minutes for it to finish.

boreal iron
#

πŸ‘

drifting reef
#

can somebody help me😩

rose warren
tired panther
#

lol

quartz kindle
rose warren
#

In the options?

quartz kindle
#

yes

rose warren
#

Yeah

quartz kindle
#

try without it

rose warren
#

Ok

#

Gimme 3 minutes for it to dump again πŸ˜‚

rose warren
earnest phoenix
#

Accept Tim as your saviour and win a FREE PS5

quartz kindle
rose warren
#

Tim is op

#

Yeah that worked Tim

quartz kindle
rose warren
#

Now I have a 1.4GB file lol

quartz kindle
#

you can gzip it yourself

rose warren
#

Yeah

quartz kindle
#

or use one of the prs

rose warren
#

It's ok. I delete the old backups anyway

#

I'll check the PRs if I have time

#

Thanks!

#

Yeah actually the PR was quick enough to fix. Thanks Tim!

fresh vortex
#

hiii

#

can someone help me

#

i am trying to do a status role

radiant kraken
#

what lib

slender thistle
#

Remember to provide all details possible, refer to channel topic

fresh vortex
#

the language i use is node.js

radiant kraken
#

what library are you using

fresh vortex
#

sorry im new to all this i just joined my frend suggested this

#

discord.js

earnest phoenix
#

oh

#

must be v13

#

wait nvm

#

i'm dumb

slender thistle
#

What is your status role command supposed to do? What's the exact issue you're having?

fresh vortex
#

Then they get a role called Has Status

#

And basically if u dont have that role you cant join the giveaway

rose warren
#

That's presence data and you'll also need intents for that

earnest phoenix
#

AHA

#

I WASN'T WRONG AFTER ALL

slender thistle
#

OS error 33 let's go

earnest phoenix
#

the fucking v13 intents got me fucked up

fresh vortex
earnest phoenix
#

i was like "wtf bro why u no work"

rose warren
#

It also has the activites

fresh vortex
#

Uh

#

What shud i do

earnest phoenix
#

so basically

#

you do what i'm boutta senf

fresh vortex
#

Alrighty

modest maple
earnest phoenix
#
const {Client, Intents} = require('discord.js');
const client = new Client({
  intents: [
    Intents.FLAGS.GUILDS
  ]
});
slender thistle
#

🀣

#

I have no fucking idea what's wrong with it even

earnest phoenix
#

phone is a pain in the ass

fresh vortex
earnest phoenix
#

imma just do guilds in there because why not

fresh vortex
#

What

earnest phoenix
#

?

#

just

#

try to find the intent that makes sense with your issue

fresh vortex
earnest phoenix
#

by whatever intent looks like it makes the most sense in your situation

fresh vortex
#

I didnt get you-

#

But ty for trying!

shadow trail
#

Can Anyone Help Me To Make A Vote Required Command For Top.gg Please

sage bobcat
#

One message removed from a suspended account.

shadow trail
#

ok\

#

thx

boreal iron
rose warren
#

Got it working in the end though

#

Tim suggested a PR that was denied because the package wasn't maintained anymore

shadow trail
#

no one answering there bro

rose warren
#

That fixed it

shadow trail
#

can u help me

boreal iron
#

Aha, alright

shadow trail
#

@rose warren bro will u help me to do it

boreal iron
#

"Fixed" is what matters

#

Take a look at the docs to do API requests every 12 hours to get the list of all voter user IDs or simply use webhooks.
Save the results (user IDs) in a database.
Check if the user ID exists in the database if somebody runs your "voted users only" command.

shadow trail
#

ohk

quartz kindle
drifting reef
#

can someone help?

earnest phoenix
#

Not if you just ask for help like that

quiet pawn
earnest phoenix
#

Yep

quiet pawn
#

you need to give what you need help wwith along with that lol

acoustic pivot
#

Helo

quiet pawn
#

helo

acoustic pivot
#

Any recommendable hosting services?

quiet pawn
#

i used to use galaxygate

acoustic pivot
#

Okay

quiet pawn
#

are you talking free or paid?

acoustic pivot
#

Either one

quiet pawn
#

free i would say repl

#

paid galaxygate

acoustic pivot
#

Okay thanks

quiet pawn
#

np

earnest phoenix
#

ew I wouldn't even suggest repl

quiet pawn
#

well

#

for free yea

earnest phoenix
#

Also I know a good hosting service that is fairly cheap

quiet pawn
#

i hosted a bot with 260 servers on it

#

and no issues

#

so i dont mind

earnest phoenix
#

They've been reliable in the past

quiet pawn
#

but i moved to using a old pc

#

well thats not free

earnest phoenix
#

I did say cheap

quiet pawn
#

i was suggesting a free thing

#

galaxy offers more then them

earnest phoenix
#

Nothing free is every worth it

quiet pawn
quiet pawn
earnest phoenix
#

I've never used galaxy so I can't say

drifting reef
earnest phoenix
#

But I know hosting bot in the past has been reliable and in most cases i've seen them price check

quiet pawn
#

i hosted a bot from 120 to 260 servers on repl no issyes

quartz kindle
#

repl.it is perfectly fine for slash commands

earnest phoenix
#

Well yea

#

thats hardly anything

#

Unless you are making a music bot

quiet pawn
#

still it gets the job done

#

for a temp thing

lunar cove
#

Umm, I have user id and want to fetch tag from it, I tried .setAuthor(${user.tag}, user.avatarURL) in an embed but it ain't working. I believe it is due too that user need to be User object of discord.js while mine is userid. How can I get user tag and user avatar from user id ? (Searched stackoverflow but there wasn't any convincing answer).

wheat mesa
#

Is there any other required fields for slash commands? I'm getting a BASE_TYPE_REQUIRED error with a message of This field is required, when in all of my commands I've included a name and description

earnest phoenix
earnest phoenix
#

or you could fetch from the api like that yea

lunar cove
tulip ledge
#

Or if its cached client.users.cache.get(userid)

earnest phoenix
#

You should of been able to pass client to the commands

tulip ledge
#

U just answered your own question, by passing it

lunar cove
#

Well sorry I'm new, I know that passing client here would work but I'm unsure what to write to pass the client πŸ˜…
also passing client is a safe practice or should we avoid that ?

earnest phoenix
#

Well, in your message event I assume you do something like cmd.execute(params) or something along those lines

#

Just pass in client to there

#

Just make sure that your params are in order when using them in your commands

#

else what you name em might not be what they are

wheat mesa
#

You can access your client through a message object in djs iirc

#

message.client

#

Without having to pass it in as a parameter

lunar cove
#

Well I'm confused due to my own mistakes. I am using a command handler even when I don't understand good enough superhappy
So i wrote client.on('message', commandHandler); in my index.js , ```javascript
const test = require('./commands/test.js');

const commands = {test};

module.exports = async function (msg) {
let tokens = msg.content.split(' ');
let command =tokens.shift();
if(command.charAt(0) == '&') {
command = command.substring(1);
commands[command](msg, tokens);
}
}``` in my commands.js, I think I need to pass it in last line as commands[command](msg, tokens, client); , am I right ? But even then how I bring client in command file ?

lunar cove
quartz kindle
#

if you have the message, you dont need to pass the client

#

you can do message.client

earnest phoenix
#

Wait what

#

Since when

quartz kindle
#

as for the webhook you need to have the client accessible somewhere

earnest phoenix
#

hey

#

i need help

#

Is this a djs v13 thing

#

i want bg to be black

quartz kindle
#

either pass the client to the webhook file at initialization, or put the webhook code in a file where the client exists

quartz kindle
#

all djs objects have .client

earnest phoenix
#

Nah

#

you're yanking my chain rn

#

so i use body{color:"black"} but it no work

lunar cove
earnest phoenix
#

I would of figured this out

quartz kindle
earnest phoenix
#

can u help

lunar cove
lunar cove
earnest phoenix
#

You dont need to with css

#

you can use names for colors

lunar cove
#

woah, that''s news to me

earnest phoenix
#

if you wanted a custom color though that is when hex codes are needed

#

css has default colors

rose warren
#

Wait so I've been passing my client to my message files all this time for nothing?... πŸ‘€

earnest phoenix
#

the bg remains white

quartz kindle
quartz kindle
#

color: black

rose warren
#

Dayum

quartz kindle
#

not color: "black"

earnest phoenix
#

Everyone has been doing that shit

#

and we could of done message.client

rose warren
#

All the guides online show it too KEKW

earnest phoenix
#

That is why I don't believe its always been like that

lunar cove
earnest phoenix
quartz kindle
lunar cove
earnest phoenix
#

with the rest of my code

quartz kindle
earnest phoenix
#

ya

quartz kindle
#

you have to check top.gg's existing css

earnest phoenix
#

do any of u mind if i dm u code

quartz kindle
#

post here

earnest phoenix
#

?

#

kk

quartz kindle
#

you're putting that in your top.gg description?

earnest phoenix
quartz kindle
#

thats not how it works

earnest phoenix
#

the animation works with dark mode

quartz kindle
#

top.gg's description is not a blank web page

earnest phoenix
#

i just pasted normal html

rose warren
#

You can't do that

quartz kindle
#

its a block of html inside an existing website

earnest phoenix
earnest phoenix
rose warren
#

If your page is already hosted somewhere else use an iframe

earnest phoenix
quartz kindle
#

your html needs to account for the existing html of top.gg

earnest phoenix
#

ya

quartz kindle
#

there is no header, no body, no doctype

earnest phoenix
#

can u send me docs for existing tags

quartz kindle
#

all of those are defined by top.gg already

rose warren
#

You can't use head, script, html etc

earnest phoenix
#

head has only title tag which idc if its ignored

#

script has nothing just basic codepen

rose warren
#

I mean the <html> tag

quartz kindle
#

scripts dont work anyway, they are blocked

rose warren
#

That's already declared

earnest phoenix
lunar cove
#

.setAuthor( ${client.users.fetch(userId)}) , is it wrong ?

quartz kindle
#

get rid of all the base html

#

use only the actual content

earnest phoenix
#

is body declared

quartz kindle
#

yes

earnest phoenix
#

then

#

how do i use css and html

#

i can only use html then

#

if i dont define body

rose warren
#

Your page should be basically

<style>
*/ CSS HERE /*
</style>
<div>... etc. 
earnest phoenix
#

its in a div?

#

ohh

rose warren
#

The body is already on the page

#

You're adding elements inside the body content

earnest phoenix
rose warren
#

The rest of the page around it is already declared

earnest phoenix
quartz kindle
#

anything you put in your top.gg long description, will be added there

earnest phoenix
#

inside a P

quartz kindle
#

inside the class content

earnest phoenix
#

okk

#

content class

#

ty

quartz kindle
#

so as you see, header, doctype, body, etc all already exist

#

dont add them yourself

#

just add the actual content

earnest phoenix
quartz kindle
#

yes

earnest phoenix
#

BUT I MANAGED TO CHANGE THe EXIStiNg CODE

quartz kindle
#

yes, you CAN change the existing css

#

not the html structure

earnest phoenix
quartz kindle
#

you can put style tags in your content, and interact with the existing css

#

style doesnt need to be inside head

#

it can be inside your content

earnest phoenix
#

of the whole website

quartz kindle
#

you can find them all with the dev tools / element inspector

earnest phoenix
#

ohh

#

ya

#

iforgot that

quartz kindle
#

also, on many tags, you will need to add !important

earnest phoenix
#

pagecontentwrapper

rose warren
#

Just remember using it to hide certain elements like ads is against the rules and may result in a ban.

earnest phoenix
#

pfft

earnest phoenix
#

I love using ad blockers for youtube

quartz kindle
earnest phoenix
#

put it to black yet its white

#

@quartz kindle

#

now it works

#

so in the css i put this?

rose warren
quartz kindle
#

yes

earnest phoenix
#

body {
      background: #000000 !important;
    }
    
#

this?

quartz kindle
#

yes

earnest phoenix
#

aah the text is black now

#

anotherhelp

#

what is the tag for all the text

rose warren
#

Just use inspect element.

#

You can't expect us to know the site css by heart

lunar cove
#

Umm, in this .setAuthor( msg.member.user.tag +'test', msg.author.displayAvatarURL) I'm unable to get avatar, can someone tell where did I go wrong ?

earnest phoenix
#

displayAvatarURL is a method

#

so you forgot ()

lunar cove
#

ohh superhappy
thanks

earnest phoenix
#

i put body css as body {
background:#000000 !important;
} yet it wont work still

#

the bg is still white

rose warren
#

Clear your cache

earnest phoenix
#

opened it in incognito

rose warren
#

Reload

earnest phoenix
#

yes

rose warren
#

There's Cloudflare caching too

earnest phoenix
#

did ctrl f5

rose warren
#

CTRL + Shift + F5

earnest phoenix
#

wait

#

wait

#

it didnt update

rose warren
#

Then inspect to check for conflicts

earnest phoenix
#

like i saved

#

i changed the text

#

still

#

it didnt change

#

even after saving

rose warren
#

Known site issue. Some people can't save.

earnest phoenix
#

it says saved

#

@rose warren how to change these

rose warren
#

Using root in your css

#

You copy and paste what you want to change from the inspector and add !important on the end. That's a quick fix.

earnest phoenix
#

ohhhk

#

someone pls help i want to remove buttons after use

#

it wont save

#

like it wont update

#

it saved

near stratus
earnest phoenix
#

@rose warren how much time to update needed?

near stratus
#

f o r e v e r

earnest phoenix
#

grrr

rose warren
#

If it's not saving it's a known site issue. I told you.

earnest phoenix
earnest phoenix
#

it saved the last edit

#

it took time to update

rose warren
#

Then it's probably caching

near stratus
earnest phoenix
#

ahh ok

slim heart
#

because it'll tell you what it's called

earnest phoenix
#

ok sure

whole pewter
#

How can I make afk command

near stratus
#
process.kill()
whole pewter
#

Dyno also can't change owner nickname but afks's us

near stratus
whole pewter
#

Oki

near stratus
earnest phoenix
#

ima process.abort() you

#

now how to remove buttons umm

whole pewter
earnest phoenix
earnest phoenix
#

lmfao

#

its ain't working

near stratus
earnest phoenix
#

components is the prop

near stratus
earnest phoenix
#

okie

#

kekw

near stratus
#

@solemn latch

lunar cove
#

Umm, one more thing pleasse javascript server1.post("/dblwebhook", webhook.listener(vote => { console.log(vote.user) const user = "<@"+vote.user+">"; client.channels.cache.get('766908428411994134').send({embed: { author: { name: `${user} voted !!`, icon_url: '', }, fields: [{ name: "Thank You for voting for us!!", value: "The Description" }] }}); })) Here How can I get user avatar with user id in icon_url of author ? (Will client.userId.displayAvatarURL() work ? , would need to add const userId = vote.user)

lyric mountain
#

you need to retrieve the user first

#

btw, what you're doing will send ALL voting messages to a single channel

#

which isn't even guaranteed to be cached

lunar cove
lyric mountain
#

an ELI5 answer would be that cache is basically a map containing recently-used stuff

#

or frequently used stuff

#

since the library deals with a hell lot of stuff, saving them all would kill your process during startup

rose warren
#

I use node-fetch to post to the channel through the API directly for doing this. Runs as a separate process to the bot.

lyric mountain
#

that's why it only keeps a minimum usable amount of entities at a time

#

if you NEED to get a channel regardless of caching, use fetch

lunar cove
#

Umm, but isn't fetch used to retrieve information, how can one send using fetch ?

lyric mountain
#

well, to send you first need to retrieve it

#

you need the user object, so retrieve it by using the provided ID

lunar cove
lyric mountain
#

async id?

#

const user = await client.users.fetch(vote.user)

lunar cove
#

ohh await here, srry i messed up there

rose warren
lunar cove
#

Ohh I am yet to try api's fully so didn't know that, I'm still a novice so don't about api much superhappy

#

Btw what's the benefit of using that ?

lyric mountain
#

well...you get the user object

#

otherwise you'd chance getting "Cannot retrieve property avatarUrl of undefined"

rose warren
#

Means no relying on cache, no extra libs etc.

#

Also if your bot is down the votes still get counted.

#

Because it's a separate process.

lunar cove
rose warren
#

Discord's API docs

#

Not discord.js

#

To get user data using node-fetch for example ^

wheat mesa
#

Only cool kids ditch fetch entirely and create raw http requests

eternal osprey
#

hey does anyone know how i can actually automatically send posts from facebook to discord?

boreal iron
#

Is there an easy way for guild owners to grant an existing bot slash.commands scope without reinventing it?

lyric mountain
#

ye

round cove
#

I don't believe so no.

#

Wait what

lyric mountain
#

ye you can

#

just use the slash scope alone

#

without the bot scope I mean

#

I did it to allow my testing bot to add slashes to my guild

long crow
lyric mountain
regal creek
#

does anyone have a arduino? If so does the arduino print messages to the ide?

#

if connected of course

rose warren
#

I think I read somewhere Discord will be granting the applications.commands scope by default at some point. Is that right?

long crow
#

It still rumors for now, but highly likely with the message.content becoming privillage

lyric mountain
#

you can still use slashes without that perm tho

#

don't think discord will allow it by default

tawny rune
tulip ledge
#

If u invite a bot without that scope it won’t work

lyric mountain
#

you just can't add guild slashes

#

globals still apply

tawny rune
#

Really? I didn't know that damn

lyric mountain
#

ye, I didn't request my users to allow slash scope yet the commands appeared everywhere basically

tawny rune
#

Interesting, I didn't know that.

rose warren
#

Makes sense. I have some bots in a server I manage and I never had to invite them again to grant the scope. They were invited long before slash commands were ever a thing.

#

I think it works for bots that were in servers before slash commands were released. Not sure if you add a bot now without the scope if it will work or not.

lyric mountain
#

I did try to add guild slashes tho, it failed if I didn't add the scope

#

ig they did it to prevent abuse

#

like, undetectable and "fuck this server in particular" abuse

rose warren
#

I kicked Probot yesterday because I wanted to disable slash commands and re-invited it with just the bot scope and that removed the slash commands. So you must still need the scope for new invites.

lyric mountain
#

the slashes get removed as soon as you remove the bot

#

they come back some time later if you readd

rose warren
#

No they're still not there

#

What I did seemed to work

lyric mountain
#

interesting then

rose warren
#

You must need the applications.commands scope for invites post-slash command release. Seems like all servers which invited bots before the release got the scope granted by default.

long crow
#

if the inviter doesnt include the application command during invite, the slash command will not appear on the guild

lyric mountain
#

now I need to update my invite link but top.gg doesn't want to KEKW

rose warren
#

Yep. For new invites this is true. If your bot was invited to a guild before the applications.commands scope was a thing then it was retroactively granted access to the scope. If your bot is only just being invited today, you need to include the scope upon inviting.

winged juniper
#

Why i have this error in my console and bot well be offline

long crow
#

update node to v16

winged juniper
#

How

long crow
#

Abort Controller only exist on v15 onward, no idea it your host

winged juniper
#

This is my package

#

How i can upgrade it to v16

rose warren
#

In your command line: node latest

winged juniper
rose warren
#

That's not where you do it

winged juniper
#

I need to use it in the host?

earnest phoenix
#

What’s different 12v and v13?

lyric mountain
#

one is chill

earnest phoenix
rose warren
#

You'll find and article there

winged juniper
#

For nude i use this

worker: node alex.js
lyric mountain
winged juniper
rose warren
#

V13 is ok. I just still don't like the way the send method is with embeds πŸ˜…

rose warren
winged juniper
#

Ok πŸ‘Œ

earnest phoenix
#

its new πŸ˜‚πŸ˜‚ old one was client.on('message')

rose warren
winged juniper
#

Ok 1 sec

rose warren
rose warren
#

You misspelt latest

winged juniper
#

Ok

rose warren
#

node latest

#

Copy and paste

winged juniper