contextMenuCommandDenied question

any way of getting the user who ran the context menu when the
contextMenuCommandDenied
listener is triggered?
Solution
That is not the valid parameters for the listener. The types are
error: Error, payload: ContextMenuCommandDeniedPayload


So to get the interaction you then do
payload.interaction
and the guild therefore is
payload.interaction.guild


When programming it is always important to adhere to the parameter order and parameter types when writing and using functions. You should always consult documentation, and if working with a library like discordjs or framework like sapphire you’d also do well to refer to the source code, which gets linked for every symbol in the documentation.
Was this page helpful?