annotation Tourmaline::Command

Overview

Define a new Command. By default all commands start with a / and commands are accessable to all chat types. You can change these defaults by supplying named parameters to the annotation.

Options:

Example:

@[Command("help", prefix: "!", private_only: true)]
def help_command(message, params)
  send_message(message.chat.id, "This is a help message")
end

The command can be a string or an array of strings.

Defined in:

tourmaline/annotations.cr