Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Commands contains the available commands Commands map[string]ICommand )
Functions ¶
func HandleCommand ¶
func HandleCommand(command string, params []string, s *discordgo.Session, m *discordgo.MessageCreate)
HandleCommand sets the incoming command to the right ICommand
Types ¶
type BaseCommand ¶
type BaseCommand struct {
// contains filtered or unexported fields
}
BaseCommand describes a default command
func (*BaseCommand) GetDescription ¶
func (c *BaseCommand) GetDescription() string
GetDescription returns the command description
func (*BaseCommand) GetListener ¶
func (c *BaseCommand) GetListener() string
GetListener returns the command string to listen on
type HelpCommand ¶
type HelpCommand struct {
BaseCommand
}
HelpCommand describes the help command
func NewHelpCommand ¶
func NewHelpCommand() *HelpCommand
NewHelpCommand creates and returns a new HelpCommand
func (*HelpCommand) Handle ¶
func (c *HelpCommand) Handle(s *discordgo.Session, m *discordgo.MessageCreate, params []string)
Handle is the function which handles the incomming command
type ICommand ¶
type ICommand interface { GetListener() string GetDescription() string Handle(s *discordgo.Session, m *discordgo.MessageCreate, params []string) }
ICommand interface defines the command interface
type MemeCommand ¶
type MemeCommand struct {
BaseCommand
}
MemeCommand describes the meme command
func NewMemeCommand ¶
func NewMemeCommand() *MemeCommand
NewMemeCommand creates and returns a new NewMemeCommand
func (*MemeCommand) Handle ¶
func (c *MemeCommand) Handle(s *discordgo.Session, m *discordgo.MessageCreate, params []string)
Handle is the function which handles the incomming command
type NetworkCommand ¶
type NetworkCommand struct {
BaseCommand
}
NetworkCommand describes the network command
func NewNetworkCommand ¶
func NewNetworkCommand() *NetworkCommand
NewNetworkCommand creates and returns a new NetworkCommandCommand
func (*NetworkCommand) Handle ¶
func (c *NetworkCommand) Handle(s *discordgo.Session, m *discordgo.MessageCreate, params []string)
Handle is the function which handles the incomming command
type PriceCommand ¶
type PriceCommand struct {
BaseCommand
}
PriceCommand describes the price command
func NewPriceCommand ¶
func NewPriceCommand() *PriceCommand
NewPriceCommand creates and returns a new PriceCommand
func (*PriceCommand) Handle ¶
func (p *PriceCommand) Handle(s *discordgo.Session, m *discordgo.MessageCreate, params []string)
Handle is the function which handles the incomming command
type VolumeCommand ¶
type VolumeCommand struct {
BaseCommand
}
VolumeCommand describes the volume command
func NewVolumeCommand ¶
func NewVolumeCommand() *VolumeCommand
NewVolumeCommand creates and returns a new VolumeCommand
func (*VolumeCommand) Handle ¶
func (v *VolumeCommand) Handle(s *discordgo.Session, m *discordgo.MessageCreate, params []string)
Handle is the function which handles the incomming command
type WalletCommand ¶
type WalletCommand struct {
BaseCommand
}
WalletCommand describes the wallet command
func NewWalletCommand ¶
func NewWalletCommand() *WalletCommand
NewWalletCommand creates and returns a new WalletCommand
func (*WalletCommand) Handle ¶
func (v *WalletCommand) Handle(s *discordgo.Session, m *discordgo.MessageCreate, params []string)
Handle is the function which handles the incomming command