Documentation
¶
Index ¶
- Constants
- Variables
- func AsCommand(in any) any
- func HasCommandPrefix(trigger string, command string, message string) bool
- func SplitArgs(s string) []string
- func StripPrefix(trigger string, command string) func(string) string
- type BijnaWeekendCommand
- type Command
- type Context
- type Executor
- type FuehrerWeekend
- type JoinCommand
- type ListCommand
- type MonkeyWeekend
- type PSCommand
- type SaveCommand
- type SetPrefixCommand
Constants ¶
View Source
const DISCORD_MSG_MAX_LEN = 2000
View Source
const GROUP_COMMANDS = `group:"commands"`
Variables ¶
View Source
var Module = fx.Module("commands", fx.Provide( AsCommand(NewSetPrefixCommand), AsCommand(NewListCommand), AsCommand(NewJoinCommand), AsCommand(NewPSCommand), AsCommand(NewSaveCommand), AsCommand(NewBijnaWeekendCommand), AsCommand(NewFuehrerWeekend), AsCommand(NewMonkeyWeekend), fx.Annotate( NewCommandExecutor, fx.ParamTags(GROUP_COMMANDS), ), ), )
Functions ¶
Types ¶
type BijnaWeekendCommand ¶
type BijnaWeekendCommand struct{}
func NewBijnaWeekendCommand ¶
func NewBijnaWeekendCommand() *BijnaWeekendCommand
func (*BijnaWeekendCommand) Apply ¶
func (b *BijnaWeekendCommand) Apply(ctx *Context) error
func (*BijnaWeekendCommand) Name ¶
func (b *BijnaWeekendCommand) Name() string
func (*BijnaWeekendCommand) SkipsPrefix ¶
func (b *BijnaWeekendCommand) SkipsPrefix() bool
type Context ¶
type Context struct { Message *discordgo.Message Content string Args []string Session *discordgo.Session }
func (*Context) Reference ¶
func (ctx *Context) Reference() *discordgo.MessageReference
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
type FuehrerWeekend ¶
type FuehrerWeekend struct{}
func NewFuehrerWeekend ¶
func NewFuehrerWeekend() *FuehrerWeekend
func (*FuehrerWeekend) Apply ¶
func (b *FuehrerWeekend) Apply(ctx *Context) error
func (*FuehrerWeekend) Name ¶
func (f *FuehrerWeekend) Name() string
func (*FuehrerWeekend) SkipsPrefix ¶
func (f *FuehrerWeekend) SkipsPrefix() bool
type JoinCommand ¶
type JoinCommand struct {
// contains filtered or unexported fields
}
func NewJoinCommand ¶
func NewJoinCommand(repo *repositories.GuildRepository) *JoinCommand
func (*JoinCommand) Apply ¶
func (j *JoinCommand) Apply(ctx *Context) error
func (*JoinCommand) Name ¶
func (j *JoinCommand) Name() string
func (*JoinCommand) SkipsPrefix ¶
func (j *JoinCommand) SkipsPrefix() bool
type ListCommand ¶
type ListCommand struct {
// contains filtered or unexported fields
}
func NewListCommand ¶
func NewListCommand(store *soundstore.SoundStore) *ListCommand
func (*ListCommand) Apply ¶
func (l *ListCommand) Apply(ctx *Context) error
func (*ListCommand) Name ¶
func (l *ListCommand) Name() string
func (*ListCommand) SkipsPrefix ¶
func (l *ListCommand) SkipsPrefix() bool
type MonkeyWeekend ¶
type MonkeyWeekend struct{}
func NewMonkeyWeekend ¶
func NewMonkeyWeekend() *MonkeyWeekend
func (*MonkeyWeekend) Apply ¶
func (b *MonkeyWeekend) Apply(ctx *Context) error
func (*MonkeyWeekend) Name ¶
func (f *MonkeyWeekend) Name() string
func (*MonkeyWeekend) SkipsPrefix ¶
func (f *MonkeyWeekend) SkipsPrefix() bool
type PSCommand ¶
type PSCommand struct {
// contains filtered or unexported fields
}
func NewPSCommand ¶
func NewPSCommand(repo *repositories.GuildRepository, queue *queues.SoundsQueue) *PSCommand
func (*PSCommand) SkipsPrefix ¶
type SaveCommand ¶
type SaveCommand struct {
// contains filtered or unexported fields
}
func NewSaveCommand ¶
func NewSaveCommand(l *zap.Logger, saver *saver.Saver, metrics *metrics.MetricsCollector) *SaveCommand
func (*SaveCommand) Apply ¶
func (s *SaveCommand) Apply(ctx *Context) error
func (*SaveCommand) Name ¶
func (s *SaveCommand) Name() string
func (*SaveCommand) SkipsPrefix ¶
func (s *SaveCommand) SkipsPrefix() bool
type SetPrefixCommand ¶
type SetPrefixCommand struct {
// contains filtered or unexported fields
}
func NewSetPrefixCommand ¶
func NewSetPrefixCommand(g *repositories.GuildRepository) *SetPrefixCommand
func (*SetPrefixCommand) Apply ¶
func (s *SetPrefixCommand) Apply(ctx *Context) error
func (*SetPrefixCommand) Name ¶
func (s *SetPrefixCommand) Name() string
func (*SetPrefixCommand) SkipsPrefix ¶
func (s *SetPrefixCommand) SkipsPrefix() bool
Click to show internal directories.
Click to hide internal directories.