internal

package
v0.0.0-...-93194af Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2018 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach

func Attach(bot *rbot.Bot)

Attach will insert all internal listeners and commands into the handler. It also requires an instance of a bot too pass onto the listener and command structs.

Types

type Commands

type Commands struct {
	// contains filtered or unexported fields
}

func (*Commands) AddHelp

func (cs *Commands) AddHelp()

func (*Commands) AddSource

func (cs *Commands) AddSource()

func (*Commands) Help

func (cs *Commands) Help(args string, e *discordgo.MessageCreate) error

func (*Commands) Source

func (cs *Commands) Source(args string, e *discordgo.MessageCreate) error

type Listeners

type Listeners struct {
	// contains filtered or unexported fields
}

Listeners contains all the internal listners for the bot. It also has a reference to the bot.

func (*Listeners) AddCommandParser

func (ls *Listeners) AddCommandParser()

AddCommandParser adds a messageCreate listener for commands.

func (*Listeners) AddMessageCreate

func (ls *Listeners) AddMessageCreate()

AddMessageCreate adds the messageCreate internal listener.

func (*Listeners) CommandParser

func (ls *Listeners) CommandParser(e *discordgo.MessageCreate)

CommandParser parses messages for commands.

func (*Listeners) MessageCreate

func (ls *Listeners) MessageCreate(e *discordgo.MessageCreate)

MessageCreate logs messages sent in all channels the bot has access to. Reference https://godoc.org/github.com/bwmarrin/discordgo#Message for what is available from the MessageCreate event.

Jump to

Keyboard shortcuts

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