GenericCommand

public struct GenericCommand: Commandable

Used for dynamically added commands

  • Used as setting the action

    Declaration

    Swift

    public var function: (Message, [String]) -> ()
  • The name of the command

    Declaration

    Swift

    public var name: String
  • Set of command options

    Declaration

    Swift

    public var options: CommandOptions
  • This is what is called on a successful command request

    Declaration

    Swift

    public func execute(_ msg: Message, _ args: [String])