bot

package
v0.0.0-...-5922caf Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PingHandlers = map[string]func(*discordgo.Session, *discordgo.MessageCreate){
	"!compliment": handlers.HandleMessage,
	"!insult":     handlers.HandleMessage,
	"!lookup":     handlers.HandleWalletName,
	"!derod":      handlers.HandleGetInfoDerod,
	"!help":       handlers.HandleHelp,
	"!tip":        handlers.HandleTip,
	"!unregister": handlers.HandleUnregister,
	"!shop":       handlers.HandleShop,
}

Functions

This section is empty.

Types

type Bot

type Bot struct {
	DiscordSession *discordgo.Session // Exported field for accessing the session session
}

func NewBot

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

func (*Bot) AddHandler

func (bot *Bot) AddHandler(handler interface{}) func()

func (*Bot) Close

func (bot *Bot) Close()

func (*Bot) GetDiscordSession

func (bot *Bot) GetDiscordSession() *discordgo.Session

func (*Bot) NewMessage

func (bot *Bot) NewMessage(session *discordgo.Session, message *discordgo.MessageCreate)

func (*Bot) OnGeneric

func (bot *Bot) OnGeneric(s *discordgo.Session, event interface{})

func (*Bot) OnReady

func (bot *Bot) OnReady(session *discordgo.Session, ready *discordgo.Ready)

func (*Bot) Open

func (bot *Bot) Open() error

Jump to

Keyboard shortcuts

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