commands

package
v0.0.0-...-3f5f969 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2021 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OPTION_TYPE_STRING  = 3
	OPTION_TYPE_INT     = 4
	OPTION_TYPE_BOOL    = 5
	OPTION_TYPE_USER    = 6
	OPTION_TYPE_CHANNEL = 7
	OPTION_TYPE_ROLE    = 8
)

Variables

View Source
var (
	Commands = map[string]commandRoute{
		"ping": {
			Name:            "ping",
			Description:     "Check the responsiveness of the bot.",
			CommandFunction: cmdPing,
		},
		"say": {
			Name:            "say",
			Description:     "Make the bot say something!",
			CommandFunction: cmdSay,
			Options: []commandOption{
				{
					Type:        OPTION_TYPE_STRING,
					Name:        "message",
					Description: "What you'd like the bot to say.",
					Required:    true,
				},
			},
		},
		"info": {
			Name:            "info",
			Description:     "About the bot.",
			CommandFunction: cmdInfo,
		},
		"help": {
			Name:            "help",
			Description:     "See Slashy's commands.",
			CommandFunction: cmdHelp,
		},
		"maths": {
			Name:            "maths",
			Description:     "Evaluate a maths expression.",
			CommandFunction: cmdMaths,
			Options: []commandOption{
				{
					Type:        OPTION_TYPE_STRING,
					Name:        "expression",
					Description: "What you'd like to evaluate.",
					Required:    true,
				},
			},
		},
		"time": {
			Name:            "time",
			Description:     "Check the time in a location.",
			CommandFunction: cmdTime,
			Options: []commandOption{
				{
					Type:        OPTION_TYPE_STRING,
					Name:        "location",
					Description: "Which time zone/location?",
					Required:    true,
				},
			},
		},
		"currency": {
			Name:            "currency",
			Description:     "Check exchange rates.",
			CommandFunction: cmdCurrency,
			Options: []commandOption{
				{
					Type:        OPTION_TYPE_STRING,
					Name:        "from",
					Description: "What currency you're converting from.",
					Required:    true,
				},
				{
					Type:        OPTION_TYPE_STRING,
					Name:        "amount",
					Description: "The amount of the base currency you're converting.",
					Required:    true,
				},
				{
					Type:        OPTION_TYPE_STRING,
					Name:        "to",
					Description: "What currency you're converting into.",
					Required:    true,
				},
			},
		},
		"dictionary": {
			Name:            "dictionary",
			Description:     "Search for words.",
			CommandFunction: cmdDictionary,
			Options: []commandOption{
				{
					Type:        OPTION_TYPE_STRING,
					Name:        "word",
					Description: "The word to search.",
					Required:    true,
				},
			},
		},
	}
)

Functions

func InitialiseCommands

func InitialiseCommands()

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL