Visitar URL original
Create Button Interaction Framework · Issue #8 · Java-Discord/JavaBot2 · GitHub
Skip to content
This repository was archived by the owner on Dec 1, 2021. It is now read-only.
This repository was archived by the owner on Dec 1, 2021. It is now read-only.

Create Button Interaction Framework #8

Description

@andrewlalis

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.

Activity

  1. danthe1st commented on Nov 9, 2021

    @danthe1st
    Member

    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).
  2. linked a pull request that will close this issueInteraction Framework #19on Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

EnhancementNew feature or request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions