Skip to content

Command system overhaul #23

Description

@Corentin-Luc-Artaud
  • Transform commands into objects respecting the following interface:
type Command interface {
    Check() boolean
    Help() string
    Action(b *Bot, ...)
    Fallback(b *Bot, ...)
}
  • help command lists all available commands along a short explicative message about the bot
  • help cmdName returns the specific help for the given command
  • Every command can take help as an argument, which returns the commands Help() containing the help message
  • When a bad arg is given, the command returns its Help()

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions