So I’m working on a Discord bot using JS and DiscordJSv14, and want the bot to use audio from a voice chat to send to another bot, some type of listen and snitch bot. So far I got the Bot’s connecting to the voice call but can’t get any of the packets to send to the other bot. Here’s some
Tag: discord
Discord.js check if a user nickname contains Numbers and Letter, if yes add calculation to the number
I’m looking for a way to check if a discord users name contains numbers and certain letter, and if it does then apply a calculation to it. For example I have a command that right now checks if the user has anything in the nickname, this adds the additional number next to the previous one (if there is one), if
Unknown column ‘narozeni’ in ‘field list’ [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 3 months ago. Improve this question
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
Sending ephemeral responses to a specific user discord js (only you can see this message)
I want my bot to send an ephemeral response (only you can see this message) to a user specified by a command, using discord.js Answer In order to send an ephemeral message to a specific user, that user needs to be the one triggering the interaction. You cannot send an ephemeral message to a random user. If you just want
Unhandled Rejection: TypeError: Cannot read properties of undefined (reading ‘0’) getting error while trying to print JSON object in discord.js v14
I want to take the names from data.json and post it on a discord embed. For example I tried to print Animal Skull in a embed but it gave me that error. error test.js my data.json I would be really gratefull if anyone can help me. Answer You should use require to get data from json And your json contains