How to make discord bot wait for reply for 5 minutes and then send a message? Using discord js

I am using Discord js to make a discord bot. The role of the bot is to send a message to user in personal messages and then wait for user response for 5 minutes. If user does not sends anything back …

Slowmode command

When I type ;sm, my bot responds with: “You need to specify a time in seconds” <-- Thats okay. But when I type ;sm [time], it still responds with: "You need to specify a time in ...

How would I bypass a cetian role on a cooldown script discord.js/ command that restricts a certain command to a certain channel

This is the current code that I have, I would like to make it where if you have a certain role then you can bypass the cooldown, also if anyone knows how to make a command that restricts a certain …

Discord.js bot joining voice channel but wont run the remaining code after joining

I have a discord bot that I’m trying to get to join a voice channel and have it repeat a sound file, so far I have got it to join but after it joins, none of the code in the arrow function is run let …

How to convert Unicode Hex Characters to Latin-1 in JavaScript

I’m using rae-api to get the definition of the words in their dictionary. The problem is for example: I search for the definition of the word hola, it returns como salutación familiar.. I …

UnhandledPromiseRejectionWarning: DiscordAPIError: Unknown Role in my code

I have a few lines of code that are causing issues, role = await message.guild.roles.cache.find(role => role.name = “Muted”); member.roles.add(role.id); This produces the following error:…

TypeError: Cannot read property ‘split’ of undefined in discord and nodejs

this is the error let token = msg.content.split(‘ ‘); ^ TypeError: Cannot read property ‘split’ of undefined at Client.msg (/app/bot.js:15:27) at Client.emit (events….

Inconsistent error when checking for user ID’s while using partials as well. (Discord.js)

The code below is the code I am using to track deleted and edited messages. However, when I try to check the user ID (because sometimes, discord bots like groovy constantly delete and edit messages …

JavaScript,Discord.js, Node.js TypeError: Cannot read property ‘execute’ of undefined

I’m building a discord bot and I want to save information in bdays.json but this error pops up. All other commands are working just fine but I am getting this error: TypeError: Cannot read property ‘…

How to have a Discord bot return the number of words in a message

client.on(‘message’, message => { if (!message.content.startsWith(prefix) || message.author.bot) return; const args = message.content.slice(prefix.length).trim().split(/ +/); const …