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
Tag: discord.js
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
Discord bot loading but commands are not working
I’m making my first Discord bot and I’m following this tutorial playlist here: https://www.youtube.com/watch?v=j_sD9udZnCk&list=PLbbLC0BLaGjpyzN1rg-gK4dUqbn8eJQq4&ab_channel=CodeLyon But for some reason my bot will load, say the load message, and even set its custom status but none of the commands are working. I have looked at many other forum posts and none are my problem so I’m very confused. I’m using Discord.js 14.3.0
Discord.js v13 Bot doesn’t collect messages in DMChannel
I’m trying to make a captcha verification system for my discord bot. So when someone join a server the bot will DM the user a captcha and the user have to solve the captcha in a given time period to get a specific role in the server but my bot doesn’t seem to collect the user’s message. I’ve tried different
Using JavaScript, how can I pull info from a database and order it in a list?
I have a rough idea on how to do this, but it doesn’t seem to be working too well. What I have already achieved is pulling all of the data necessary that needs ordered. What I need is a way to take all of that information and order it from the highest number to the lowest number, and then display
Cannot figure out how to respond to choices with embeds
Basically, what I am trying to do is provide people with a guide of what to do with my bot but I cant figure out how to use choices and how to respond to a certain choice that gets selected (for example, someone selects ‘data’ and gets a guide about their data) Answer Most of what you have typed in
discord.js “TypeError: fn is not a function”
So I started getting this “TypeError: fn is not a function” after I added the if-else statement to the code Thats the code I have and my error is Thank you to anyone that is able to help me find a fix for this. Answer It’s because .some() accepts a callback function only but notverified is a Role or a
TypeError [InvalidType]: Supplied roles is not a Role, Snowflake or Array or Collection of Roles or Snowflakes issue
I’m having an issue creating my multiple select menu options on Discord.js v14. I’m wanting to add more than one role to the member when more than one option is selected in the drop-down menu. However, I’m getting the following error: TypeError [InvalidType]: Supplied roles is not a Role, Snowflake or Array or Collection of Roles or Snowflakes issue If