Adding components as a response to a slash command #9363
-
I've had a lot of trouble attempting to figure this out, and I still haven't. I would like to know if it's possible to add components (like some buttons) to a response to a slash command, as I would prefer using them over reactions. Any help is appreciated :) |
Beta Was this translation helpful? Give feedback.
Answered by
lightlybakedman
Apr 16, 2023
Replies: 1 comment 1 reply
-
They are used the same way as when you normally send them. If you haven't worked with views before, see https://github.com/Rapptz/discord.py/tree/master/examples/views |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
alfuwu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
They are used the same way as when you normally send them.
await interaction.response.send_message(..., view = MyView())
If you haven't worked with views before, see https://github.com/Rapptz/discord.py/tree/master/examples/views