bot

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

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

func NewBot

func NewBot(token string) (*Bot, error)

NewBot creates a new Bot instance. This function is used by the dependency injector to create a new Bot instance.

func (*Bot) AddMessageCreateHandler added in v1.2.0

func (b *Bot) AddMessageCreateHandler(handler MessageCreateHandler)

func (*Bot) AddReadyHandler added in v1.2.0

func (b *Bot) AddReadyHandler(handler ReadyHandler)

func (*Bot) Shutdown

func (b *Bot) Shutdown() error

func (*Bot) Start

func (b *Bot) Start() error

type MessageCreateHandler added in v1.2.0

type MessageCreateHandler interface {
	Handle(*discordgo.Session, *discordgo.MessageCreate)
}

type ReadyHandler added in v1.2.0

type ReadyHandler interface {
	Handle(*discordgo.Session, *discordgo.Ready)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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