Skip to content

Embed Instance MVVM  #39

Open
Open
@khionu

Description

@khionu

Various parts of the bot will get a bit "noisy" to not have some feature to limit the amount of information displayed. I suggest we have a utility to manage embeds via limited-lifetime MVVM instances.

Suggested outline:

  • A Page<S> trait where S is the state
    • render function to generate the embed, taking the state and context, and returning an EmbedBuilder and set of reactions to be added to the message
    • callback function for when a reaction is clicked. Takes state and context, and returns a Transition, which will include Transition::NoOp
  • This will be managed in a Future that has an inner time out that is reset immediately before callback is invoked.
  • Possibly an associated constant with configurations for that Page.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions