Get message text from ContextMenuCommandInteraction
Another noob question, sorry!
Pretty much title. I have tried parsing the JSON object and using fetchReply() but I believe that is for the reply generated by the bot.
7 Replies
If I remember correctly, you get it like so:
The
true
just means its required (ie can't be null)Much easier actually
https://github.com/favware/dragonite/blob/main/src/commands/Pokemon/pokemon.ts#L61
interaction.targetMessage.content
Also this is one of the exception cases where you do not need the message content intent to get the message content. @Dragonite does not have that intent but the command still works.
No options on context menu commands 🙂Works for me. Never realized there was a type guard for that though, neat.
You might need a separate type because it's a MessageContextMenu, not a UserContextMenu
Solution
See if there's anything for
MessageContextMenuInteraction
perfect. Thank you!!