discord/cloudflare-sample-app

NOT AN ISSUE: how to get command parameter

Opened this issue · 1 comments

what if i want to give user the option to specify command paramter like /aww 123, here i want to get 123, how i can do it?

what if i want to give user the option to specify command paramter like /aww 123, here i want to get 123, how i can do it?

If you've already set up the param in your slash command's options, you can get the argument value from the interaction object:

const input = interaction.data.options[0].value;