handler

package
v0.0.0-...-9ab1851 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Bot        *bot.Bot
	CommandMap map[string]*command.Command
	// contains filtered or unexported fields
}

Handler of commands

func New

func New(b *bot.Bot) Handler

New returns new CommandHandler

func (*Handler) HandleMessage

func (h *Handler) HandleMessage(s *discordgo.Session, m *discordgo.MessageCreate)

HandleMessage handles new message event

func (*Handler) HandleMessageDelete

func (h *Handler) HandleMessageDelete(s *discordgo.Session, m *discordgo.MessageDelete)

HandleMessageDelete handles message delete event

func (*Handler) HandleMessageUpdate

func (h *Handler) HandleMessageUpdate(s *discordgo.Session, m *discordgo.MessageUpdate)

Handles message update event

func (*Handler) HandleReady

func (h *Handler) HandleReady(s *discordgo.Session, r *discordgo.Ready)

HandleReady handles ready event

func (*Handler) HandleResumed

func (h *Handler) HandleResumed(s *discordgo.Session, r *discordgo.Resumed)

HandleResumed handles discord REsumed event

func (*Handler) LoadCommands

func (h *Handler) LoadCommands(strictMode bool)

LoadCommands builds commands and links aliases with command pointers in CommandHandler.CommandMap

Jump to

Keyboard shortcuts

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