commands

package
v0.0.0-...-ada9184 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: OSL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCommands

func InitCommands(botLogger *common.ExtendedLogger, botConfig *common.BotConfig, state *state.State)

Types

type BadgeData

type BadgeData struct {
	Guilds map[string]CustomBadge `json:"guilds"`
	Users  map[string]*UserBadges `json:"users"`
}
var (
	Badges BadgeData
)

type Command

type Command struct {
	api.CreateCommandData

	ModOnly   bool
	OwnerOnly bool
	Execute   func(e *gateway.InteractionCreateEvent, d *discord.CommandInteraction) error
}

type CustomBadge

type CustomBadge struct {
	Id   string `json:"id,omitempty"`
	Url  string `json:"url,omitempty"`
	Text string `json:"text"`
}

type UserBadges

type UserBadges struct {
	Roles  []string      `json:"roles,omitempty"`
	Custom []CustomBadge `json:"custom,omitempty"`
}

Jump to

Keyboard shortcuts

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