Skip to content

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 t…

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 eac…

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&#82…

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…