Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveConfigString ¶ added in v0.5.0
ResolveConfigString resolves the value of a configuration string.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
Bot represents ALL of the state of the bot.
func (*Bot) ReplyToMessage ¶ added in v0.5.0
ReplyToMessage reoplies to a message.
func (*Bot) Run ¶
func (b *Bot) Run()
Run starts up the bot. This operation is blocking and cleanups after receiving a kill instruction.
func (*Bot) SendMessage ¶ added in v0.4.0
SendMessage sends a message to a specific channel.
type Command ¶
type Command struct { Name string Aliases []string Desc string Op func(ci CommandInput) Args []CommandArg ApprovedRoles []string }
Command represents a discord command.
type CommandArg ¶ added in v0.5.0
CommandArg represents an argument for a Command.
type CommandInput ¶ added in v0.2.0
type CommandInput struct { Bot *Bot Session *discordgo.Session Message *discordgo.Message Args map[string][]string }
CommandInput represents the input to a command handler.
type Config ¶ added in v0.5.0
type Config struct { // public Name string Token string Commands []Command Events []Event EnableHelp bool Prefix string LoggingChannelID string // contains filtered or unexported fields }
Config represents the configuration options for a bot.
type EventScheduler ¶ added in v0.5.0
type EventScheduler struct {
// contains filtered or unexported fields
}
EventScheduler represents the scheduler for CRON events.
func NewEventScheduler ¶ added in v0.5.0
func NewEventScheduler(sendFunc func(string, string), e []Event) *EventScheduler
NewEventScheduler constructs a new EventScheduler.
type Logger ¶ added in v0.5.0
type Logger struct {
// contains filtered or unexported fields
}
Logger represents an instance of a logger. If the bot is running and a logging channel is setup then the bot will log to that channel, otherwise it'll log to stdout.