Help with slash commands
Hello, I'm trying to work on a project that involves doing some type of user lookup in a database.
My current code looks like this:
Ideally, I want the user to be able to provide either a user @mention, or a user ID, or even a username. What would be the best way to approach this?
Solution:Jump to solution
instead of adding a string option, add a user option. You can see this in action with many of @Spinel 's commands for the
target
option3 Replies
Solution
instead of adding a string option, add a user option. You can see this in action with many of @Spinel 's commands for the
target
optionthen you dont even need to parse it at all anymore because you always get the user
What about in events where I just want to search for a username?
Actually, there is a way I could implement it.. nevermind, thanks