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

Feature request: Macro for Button callbacks #311

Open
flashgnash opened this issue Oct 20, 2024 · 0 comments
Open

Feature request: Macro for Button callbacks #311

flashgnash opened this issue Oct 20, 2024 · 0 comments

Comments

@flashgnash
Copy link

flashgnash commented Oct 20, 2024

I've been working with Buttons, and it seems as though the only ways to handle them are to either use the interaction collector (pauses thread waiting for a single button click event) or to define an event handler listening for string IDs

Based on just my observations, it looks like discord handles button callbacks in the same way as it handles context menu buttons and commands, so would it be possible to get a macro along the lines of:

#[poise::command(slash_command, button_callback = "button_id")]
Or
#[poise::command(button_callback)] where it listens for the button ID equal to the function name

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

1 participant