commands

package
v0.0.0-...-81345b5 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2023 License: MIT Imports: 4 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 interface {
	Execute(s *discordgo.Session, m *discordgo.MessageCreate) error
	Init(gptClient gpt.GPTClient)
	Trigger() string
}

Command defines the interface for bot commands.

type HelloCommand

type HelloCommand struct {
}

func (*HelloCommand) Execute

Execute runs the command's logic.

func (*HelloCommand) Init

func (cmd *HelloCommand) Init(gptClient gpt.GPTClient)

Init does nothing for HelloCommand but is necessary to satisfy the Command interface.

func (*HelloCommand) Trigger

func (cmd *HelloCommand) Trigger() string

Trigger returns the command trigger string.

type HeyPrefixCommand

type HeyPrefixCommand struct {
	GPTClient gpt.GPTClient
}

func (HeyPrefixCommand) Execute

func (*HeyPrefixCommand) Init

func (cmd *HeyPrefixCommand) Init(gptClient gpt.GPTClient)

func (HeyPrefixCommand) Trigger

func (cmd HeyPrefixCommand) Trigger() string

type KrobyCommand

type KrobyCommand struct {
	GPTClient gpt.GPTClient
}

func (KrobyCommand) Execute

func (*KrobyCommand) Init

func (cmd *KrobyCommand) Init(gptClient gpt.GPTClient)

func (KrobyCommand) Trigger

func (cmd KrobyCommand) Trigger() string

Jump to

Keyboard shortcuts

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