Slash command with dynamic number of arguments? #9390
Unanswered
damian-kos
asked this question in
Q&A
Replies: 1 comment
-
🤔 I mean, you could make use of the fact that you can construct a callback dynamically, but I wouldn't, you'd still be having just as much data that needs changing each time (discord.py needs the type information to tell discord what's valid user input for that slash arg) so instead of having the types be in the function directly, you'd still need them in yet another mapping, and then you'd need to generate a callback from this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So let's say that basing on user input (
test_dict
andexample_dict
in this case). I'd like to configure a slash command. But command takes arguments with their annotations. So if the user's input is 4 parameters I'd like my command to have 4 parameters as well but seems like they need to be hard-coded?So instead of listed param1... in
person()
I wonder if there is a way to create them basing on dict in this example.Beta Was this translation helpful? Give feedback.
All reactions