command

package
v0.0.0-...-3913db3 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AddJokeCommandName = "add-joke"
	GetJokeCommandName = "joke"
)
View Source
const (
	NextJokeButtonName         = "nextJokeButtonId"
	SameJokeCategoryButtonName = "sameJokeButtonId"
	ApologiesButtonName        = "apologiesButtonId"
)
View Source
const ListCommandName = "list"
View Source
const (
	SpockCommandName = "spock"
)
View Source
const StopCommandName = "stop"
View Source
const WelcomeCommandName = "welcome"

Variables

This section is empty.

Functions

func CustomID

func CustomID(i discordgo.InteractionCreate, pos buttonPosition) (string, error)

Types

type AddJokeCommand

type AddJokeCommand struct {
	Service joke.AddService
}

func (AddJokeCommand) Command

type ApologiesOption

type ApologiesOption struct{}

func (ApologiesOption) Match

func (a ApologiesOption) Match(customID string) bool

type DiscordError

type DiscordError struct {
	Err error
	Msg string
}

func (DiscordError) Error

func (e DiscordError) Error() string

func (DiscordError) Response

type DiscordEventHandler

type DiscordEventHandler interface {
	Execute(ctx context.Context, s *discordgo.Session, i *discordgo.InteractionCreate) (DiscordMessageReceiver, error)
}

type DiscordMessageReceiver

type DiscordMessageReceiver interface {
	Response() *discordgo.InteractionResponseData
}

type DiscordOptionMatcher

type DiscordOptionMatcher interface {
	Match(customID string) bool
}

type DiscordSlashCommandHandler

type DiscordSlashCommandHandler interface {
	Command() *discordgo.ApplicationCommand
	DiscordEventHandler
}

type JokeCommand

type JokeCommand struct {
	Services []joke.SearchService
}

func (JokeCommand) Command

type ListCommand

type ListCommand struct {
	// contains filtered or unexported fields
}

func NewListCommand

func NewListCommand() *ListCommand

func (ListCommand) Command

type NextJokeOption

type NextJokeOption struct {
	Services []joke.SearchService
}

func (NextJokeOption) Match

func (n NextJokeOption) Match(customID string) bool

type NextListCommandOption

type NextListCommandOption struct {
	CMD *ListCommand
}

func (NextListCommandOption) Match

func (n NextListCommandOption) Match(customID string) bool

type PreviousListCommandOption

type PreviousListCommandOption struct {
	Cmd *ListCommand
}

func (PreviousListCommandOption) Execute

func (PreviousListCommandOption) Match

func (p PreviousListCommandOption) Match(customID string) bool

type SameJokeCategoryOption

type SameJokeCategoryOption struct {
	Services []joke.SearchService
}

func (SameJokeCategoryOption) Match

func (s SameJokeCategoryOption) Match(customID string) bool

type SimpleMessage

type SimpleMessage struct {
	Msg    string
	Hidden bool
}

func (SimpleMessage) Response

func (s SimpleMessage) Response() (msg *discordgo.InteractionResponseData)

type SpockCommand

type SpockCommand struct {
	GlobalCtx       context.Context
	MusicStopChs    map[string]chan struct{}
	GuildVoiceChats map[string]voice.ChatInfo
}

func (SpockCommand) Command

type StopCommand

type StopCommand struct {
	MusicStopChs map[string]chan struct{}
}

func (StopCommand) Command

func (StopCommand) Execute

type WelcomeCommand

type WelcomeCommand struct{}

func (WelcomeCommand) Command

Jump to

Keyboard shortcuts

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