discord

package
v0.0.0-...-2cb72f2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command interface {
	// contains filtered or unexported methods
}

Represents a single command.

type CommandManager

type CommandManager struct {
	*cfg.Config
	*db.Database
	*utils.Emailer

	UserSession  *discordgo.Session
	Prefix       string
	PrefixLength int
	Commands     map[string]Command
}

Manager for all commands.

func New

func New(config *cfg.Config, database *db.Database, emailer *utils.Emailer, us *discordgo.Session) *CommandManager

Makes a new command manager, filling in all available commands.

func (*CommandManager) CommandForwarder

func (manager *CommandManager) CommandForwarder(session *discordgo.Session, message *discordgo.MessageCreate)

Event handler for the message create event that forwards commands to the correct command handler.

Jump to

Keyboard shortcuts

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