bot

package
v0.0.0-...-9367e25 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 15 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 struct {
	AppCommand discordgo.ApplicationCommand
	Handler    func(s *discordgo.Session, interaction *discordgo.InteractionCreate)
}

type Commands

type Commands map[string]Command

Commands maps command names to Command instances.

type Yada

type Yada struct {
	Commands Commands
	Discord  *discordgo.Session
	Config   config.Config

	Queries *sqlite.Queries

	Images    *images.Service
	Emojis    *emojis.Service
	Muses     *muses.Service
	Say       *say.Service
	Reminders *reminders.Service
}

func NewYada

func NewYada(cfg config.Config) *Yada

func (*Yada) AllMessagesHandler

func (y *Yada) AllMessagesHandler(ds *discordgo.Session, m *discordgo.MessageCreate)

func (*Yada) ChoiceHandler

func (y *Yada) ChoiceHandler(s *discordgo.Session, interaction *discordgo.InteractionCreate)

func (*Yada) CleanupCommands

func (y *Yada) CleanupCommands()

CleanupCommands deletes all existing commands. Kinda overkill, but who cares. :)

func (*Yada) InitializeCommands

func (y *Yada) InitializeCommands()

func (*Yada) Run

func (y *Yada) Run()

Jump to

Keyboard shortcuts

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