commands

package
v0.0.0-...-13e073c Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const OwnerOnly = math.MaxInt64

Variables

View Source
var CommandList = make(map[string]Command)

Functions

func AddCommand

func AddCommand(command Command)

func TryInvoke

func TryInvoke(s *discordgo.Session, msg *discordgo.Message, command Command)

Types

type AddPokeCmd

type AddPokeCmd struct {
}

func (AddPokeCmd) Aliases

func (a AddPokeCmd) Aliases() []string

func (AddPokeCmd) Help

func (a AddPokeCmd) Help() string

func (AddPokeCmd) Name

func (a AddPokeCmd) Name() string

func (AddPokeCmd) Permissions

func (a AddPokeCmd) Permissions() (required int)

func (AddPokeCmd) Run

func (a AddPokeCmd) Run(session *discordgo.Session, msg *discordgo.Message, args []string)

type Command

type Command interface {
	Help() string
	Run(session *discordgo.Session, msg *discordgo.Message, args []string)
	Name() string
	Permissions() (required int)
	Aliases() []string
}

type HelpCmd

type HelpCmd struct {
}

func (HelpCmd) Aliases

func (h HelpCmd) Aliases() []string

func (HelpCmd) Help

func (h HelpCmd) Help() string

func (HelpCmd) Name

func (h HelpCmd) Name() string

func (HelpCmd) Permissions

func (h HelpCmd) Permissions() (required int)

func (HelpCmd) Run

func (h HelpCmd) Run(session *discordgo.Session, msg *discordgo.Message, args []string)

type PokeTypesCmd

type PokeTypesCmd struct {
}

func (PokeTypesCmd) Aliases

func (p PokeTypesCmd) Aliases() []string

func (PokeTypesCmd) Help

func (p PokeTypesCmd) Help() string

func (PokeTypesCmd) Name

func (p PokeTypesCmd) Name() string

func (PokeTypesCmd) Permissions

func (p PokeTypesCmd) Permissions() (required int)

func (PokeTypesCmd) Run

func (p PokeTypesCmd) Run(session *discordgo.Session, msg *discordgo.Message, args []string)

type RandomPokeCmd

type RandomPokeCmd struct {
}

func (RandomPokeCmd) Aliases

func (r RandomPokeCmd) Aliases() []string

func (RandomPokeCmd) Help

func (r RandomPokeCmd) Help() string

func (RandomPokeCmd) Name

func (r RandomPokeCmd) Name() string

func (RandomPokeCmd) Permissions

func (r RandomPokeCmd) Permissions() (required int)

func (RandomPokeCmd) Run

func (r RandomPokeCmd) Run(session *discordgo.Session, msg *discordgo.Message, args []string)

type ShowPokeCmd

type ShowPokeCmd struct {
}

func (ShowPokeCmd) Aliases

func (c ShowPokeCmd) Aliases() []string

func (ShowPokeCmd) Help

func (c ShowPokeCmd) Help() string

func (ShowPokeCmd) Name

func (c ShowPokeCmd) Name() string

func (ShowPokeCmd) Permissions

func (c ShowPokeCmd) Permissions() (required int)

func (ShowPokeCmd) Run

func (c ShowPokeCmd) Run(session *discordgo.Session, msg *discordgo.Message, args []string)

Jump to

Keyboard shortcuts

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