bot

package
v0.0.0-...-7dafa0e Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AboutCommand

func AboutCommand(s *discordgo.Session, i *discordgo.InteractionCreate)

AboutCommand shows an about embed for the bot

func LoadDatabase

func LoadDatabase() *bolt.DB

func OnGuildChannelCreateHandler

func OnGuildChannelCreateHandler(b *Bot) func(*discordgo.Session, *discordgo.ChannelCreate)

OnGuildChannelCreateHandler is another specific use-case handler function that invalidates the bot's channel ID cache if the channel in the cache is deleted

func RollDiceCommand

func RollDiceCommand(s *discordgo.Session, i *discordgo.InteractionCreate)

RollDiceCommand rolls an RPG dice query string

func SetDatabasePath

func SetDatabasePath(path string)

Types

type Bot

type Bot struct {
	Start         time.Time
	SlashCommands map[string]*chat.SlashCommand

	*discordgo.Session
	// contains filtered or unexported fields
}

Bot encompasses a DiscordGo Bot

func NewBot

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

NewBot creates a new Bot

func (*Bot) RegisterSlashCommands

func (b *Bot) RegisterSlashCommands() error

func (*Bot) Self

func (b *Bot) Self() (*discordgo.User, error)

Self returns the User struct associated with the bot user

func (*Bot) String

func (b *Bot) String() string

Jump to

Keyboard shortcuts

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