Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

Create Button Interaction Framework #8

Open
2 tasks
andrewlalis opened this issue Nov 5, 2021 · 1 comment · May be fixed by #19
Open
2 tasks

Create Button Interaction Framework #8

andrewlalis opened this issue Nov 5, 2021 · 1 comment · May be fixed by #19
Assignees
Labels
Enhancement New feature or request

Comments

@andrewlalis
Copy link
Contributor

andrewlalis commented Nov 5, 2021

Create a framework that allows us to handle a variety of button interactions cleanly.

Here are some use cases that must be addressed:

  • One-off buttons that, when pressed, do some logic that might depend on parameters that were set when creating the button.
  • General-purpose buttons that have a fixed function at all times.
@danthe1st
Copy link
Member

danthe1st commented Nov 9, 2021

I want to suggest a few things about this:

  • bind the button/interaction framework to commands. Every interaction is assigned to a specific command (e.g. warning per button triggers a method ik the warn command). The interaction id could have the format commandname:whatever (and commandname:subcommandname:whatever if the command uses subcommands).
  • Make the interaction framework independent of buttons allowing other interactions.
  • Use a default-method in the command interface for triggering interaction messages. This would make commands work without interaction responses.
  • Let the interaction action return a response just like the coommand action does so that the bot definitely responds (also include a response on thrown exceptions).

@jasonlessenich jasonlessenich linked a pull request Nov 13, 2021 that will close this issue
@jasonlessenich jasonlessenich linked a pull request Nov 13, 2021 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants