Answer on quoted message for slash commands

Hey, I’m working on a bot using Discord.js and I’d like a Slash Command reply to the message that the user is referencing (the quoted message). Use Case: A user replies to a message in the chat. They use the Slash Command in their reply. The bot should not reply to the Slash Command message itself but instead to the original message the user replied to. What I’ve tried: I attempted to use interaction.message.reference.messageId, but it seems this only works with regular messages and not Slash Commands. Is there any way to get the referenced message in a Slash Command? Or is this only possible with Message Commands? Node: v20 djs: 14.15.2
6 Replies
d.js toolkit
d.js toolkit3w ago
- 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!
tark
tarkOP3w ago
now the bot should answer d.js.toolkit with the slash command
No description
tark
tarkOP3w ago
Thanks in advance 🙂
treble/luna
treble/luna3w ago
You cant. Use a message context menu
tark
tarkOP3w ago
alright, thanks
mallusrgreat
mallusrgreat3w ago
so you want the bot to reply with the application's name? oh

Did you find this page helpful?