bot

package
v0.0.0-...-b4fe549 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: Apache-2.0 Imports: 14 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(config *Config) *Bot

func (*Bot) RegisterCommands

func (b *Bot) RegisterCommands(cmds ...*Command) error

func (*Bot) Run

func (b *Bot) Run(ctx context.Context) error

type Command

type Command struct {
	Command *discordgo.ApplicationCommand
	Handler InteractionHandler
}

type Config

type Config struct {
	DiscordConfig

	DatabaseURL string
}

type DiscordConfig

type DiscordConfig struct {
	Token string

	GuildID   string
	MessageID string
	RoleID    string

	LogChannelID string
}

type InteractionHandler

type InteractionHandler func(*discordgo.Session, *discordgo.InteractionCreate)

Jump to

Keyboard shortcuts

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