8000 Contain &Message in FrameworkContext · Issue #26 · serenity-rs/framework · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on May 21, 2024. It is now read-only.
This repository was archived by the owner on May 21, 2024. It is now read-only.
Contain &Message in FrameworkContext #26
Open
@kangalio

Description

@kangalio

The FrameworkContext docs state: this context type contains every data that's relevant to the command. Would it be possible to move the &Message parameter, that every command function currently had, into FrameworkContext as well?

  • it would make command functions shorter and cleaner
  • it would be more consistent (since other data relevant to the command already resides in FrameworkContext)
  • it encapsulates all useful command context into a single struct that can be passed around easily (for example in my bot using this framework I will have to pass around both FrameworkContext and &Message to a certain utility function, which seems redundant)

Is there an issue with the proposal that I hadn't considered? Otherwise I'd gladly create a PR for this

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestProposition for a new feature or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0