Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NOT AN ISSUE: how to get command parameter #33

Open
appsdevpk opened this issue Jan 18, 2024 · 1 comment
Open

NOT AN ISSUE: how to get command parameter #33

appsdevpk opened this issue Jan 18, 2024 · 1 comment

Comments

@appsdevpk
Copy link

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?

@imgta
Copy link

imgta commented Sep 2, 2024

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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants