Documentation
¶
Overview ¶
Package botinfo implements commands that return info about the bot.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Commands = [...]basecommand.Command{ { Name: "botinfo", Aliases: []string{"bot", "info", "about", "ping"}, Desc: "Replies with info about the bot.", Permission: permission.Normal, Handler: func(msg *base.IncomingMessage, args []arg.Arg) ([]*base.Message, error) { var resp strings.Builder fmt.Fprintf(&resp, "Beep boop, this is Airbot running as %s in %s", msg.Resources.Platform.Username(), msg.Message.Channel) fmt.Fprintf(&resp, " with prefix %s on %s.", msg.Prefix, msg.Resources.Platform.Name()) fmt.Fprintf(&resp, " Made by airforce2700, source available on GitHub ( %ssource )", msg.Prefix) return []*base.Message{ { Channel: msg.Message.Channel, Text: resp.String(), }, }, nil }, }, { Name: "prefix", Desc: "Replies with the prefix in this channel.", Permission: permission.Normal, Handler: func(msg *base.IncomingMessage, args []arg.Arg) ([]*base.Message, error) { return []*base.Message{ { Channel: msg.Message.Channel, Text: "This channel's prefix is " + msg.Prefix, }, }, nil }, }, { Name: "source", Desc: "Replies a link to the bot's source code.", Permission: permission.Normal, Handler: func(msg *base.IncomingMessage, args []arg.Arg) ([]*base.Message, error) { return []*base.Message{ { Channel: msg.Message.Channel, Text: "Source code for Airbot available at https://github.com/airforce270/airbot", }, }, nil }, }, { Name: "stats", Desc: "Replies with stats about the bot.", Permission: permission.Normal, Handler: stats, }, }
Commands contains this package's commands.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.