Skip to content
Advertisement

Tag: discord

I can’t edit a message from discord.js bot

I want to make a countdown timer that uses a command /timer minutes seconds where the user chooses how long the countdown will be. I want the bot to send the timer as a reply to the command which I’ve successfully done. However, I also want the message to update along with the timer. I can console.log the timer and

Updating variables with Discord.JS

I’m trying to work out how to update variables that are declared at runtime. In my code it’s a simple random number generator. It works but doesn’t update, i.e. if the slash command /rng is used, alpha never updates past the initial number it picked, so it just repeats the same number at each use of /rng and I understand

Get channels of category discord v14

i’m trying to get all channels and delete these channels of category in discord v14, but throw me an error: client.channels.cache.get(…).children.forEach is not a function Answer CategoryChannel.children is type CategoryChannelChildManager, which doesn’t have a forEach method, so you can’t call forEach on it. CategoryChannelChildManager.cache is type Collection<Snowflake, GuildChannel>, which does has a forEach method, so you can call forEach on

Interaction has already been acknowledged Discord.js

This command keeps on returning Interaction has already been acknowledged. How can I solve this? Here’s the code I’m currently using: The error is showing: Answer On line 44: await i.deferUpdate({ fetchReply: true }); It makes the error because the interaction has already been replied to. The error should go away when you remove this line. You also should replace

How do I send a sticker in Discord.js

I can’t figure out how to send a sticker in discord.js. Here is my code (ids removed): And when trying that I get this error: But if I just try stickers: client.guilds.cache.get(‘guild id’).stickers.cache it works but instead sends every sticker in the server Does anyone know what this error means, how to fix it, and if there is just a

Advertisement