add reaction to a reply message
i'm trying to add a reaction to the replying message at a slash command
Code:
(the main code of the function come of this link https://discordjs.guide/popular-topics/reactions.html#awaiting-reactions)
but i've got an error message
and on discord there is no reaction added by the bot
thanks for helping me to understand why the bot don't react to it message
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
5 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!npm -v
=> 10.4.0
npm list discord.js
=>
[email protected] /home/runner/discordjs
āāā [email protected]In order to react to a message the message needs to be fetched, so insteand of
const message = await interaction.reply("choice")
use const message = await interaction.reply({ content: "choice", fetchReply: true });
thanks but when i swap for you code i've got this error
and the bot as reply this message with no reactions :
what sort of channel is this?
is this a dm channel? if so, do you have the
Channel
partial?
if not, do you have the Guilds
intent?