command

package
v0.0.0-...-6376c58 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const FOURTEEN_DAYS = 24 * 14

Variables

This section is empty.

Functions

func DelTwitchCommandMetadata

func DelTwitchCommandMetadata() *discordgo.ApplicationCommand

func InviteCommandMetadata

func InviteCommandMetadata() *discordgo.ApplicationCommand

func PurgeCommandMetadata

func PurgeCommandMetadata() *discordgo.ApplicationCommand

func SetTwitchCommandMetadata

func SetTwitchCommandMetadata() *discordgo.ApplicationCommand

func SozlukCommandMetadata

func SozlukCommandMetadata() *discordgo.ApplicationCommand

Types

type Command

type Command interface {
	GetCommands() CommandMap
	GetSystemCommands() SysCommandMap
	Run(context context.Context, cmdName string, params []string, m *discordgo.MessageCreate)
	Respond(ctx context.Context, m *discordgo.MessageCreate, cmdName string, messageContent string)
	DeployCommands(discordClient *discordgo.Session)
}

func New

func New(dS *discordgo.Session, token string, service service.Service, cooldownPeriod time.Duration) Command

type CommandFunc

type CommandFunc func(context context.Context, s *discordgo.Session, i *discordgo.InteractionCreate, service service.Service)

type CommandMap

type CommandMap map[string]CommandFunc

type SysCommandFunc

type SysCommandFunc func(context context.Context, m *discordgo.MessageCreate, commandName string, params []string) (*models.CommandResponse, error)

type SysCommandMap

type SysCommandMap map[string]SysCommandFunc

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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