Documentation
¶
Index ¶
- Variables
- func AddModule(module *Module)
- func AddModules(modules ...*Module)
- func Close()
- func Connect() error
- func DeployCommands() error
- func InteractionEvent(e *gateway.InteractionCreateEvent)
- func NewClient(token string)
- type Argument
- type AutoCompleteContext
- type BasicContext
- type Command
- type CommandContext
- func (ctx *CommandContext) Argument(index int) *Argument
- func (ctx *CommandContext) Edit(args ...interface{}) (msg *discord.Message, err error)
- func (ctx *CommandContext) Embed(eb *utils.Embed) *CommandContext
- func (ctx *CommandContext) Ephemeral() *CommandContext
- func (ctx *CommandContext) File(file sendpart.File) *CommandContext
- func (ctx *CommandContext) Guild() *discord.Guild
- func (ctx *CommandContext) Reply(args ...interface{})
- func (ctx *CommandContext) Stacktrace(err error)
- func (ctx *CommandContext) VoiceState() *discord.VoiceState
- type Event
- type Module
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AddModules ¶
func AddModules(modules ...*Module)
func DeployCommands ¶
func DeployCommands() error
func InteractionEvent ¶
func InteractionEvent(e *gateway.InteractionCreateEvent)
Types ¶
type AutoCompleteContext ¶
type AutoCompleteContext struct { *gateway.InteractionCreateEvent Data *discord.AutocompleteInteraction State *state.State }
func NewAutoCompleteContext ¶
func NewAutoCompleteContext(e *gateway.InteractionCreateEvent, state *state.State, data *discord.AutocompleteInteraction) *AutoCompleteContext
type BasicContext ¶
type BasicContext struct { *sync.Mutex ChannelID discord.ChannelID GuildID discord.GuildID State *state.State // contains filtered or unexported fields }
func NewBasicContext ¶
func NewBasicContext(channelID discord.ChannelID, guildID discord.GuildID) *BasicContext
func (*BasicContext) Embed ¶
func (ctx *BasicContext) Embed(embed *utils.Embed)
func (*BasicContext) File ¶
func (ctx *BasicContext) File(file sendpart.File)
func (*BasicContext) Send ¶
func (ctx *BasicContext) Send(args ...interface{})
type Command ¶
type Command struct {
Name, Description string
Module *Module
Deferred bool
Type discord.CommandType
Options discord.CommandOptions
Handler func(*CommandContext)
AutoCompleteHandler func(*AutoCompleteContext) api.AutocompleteStringChoices
}
func (*Command) RAW ¶
func (cmd *Command) RAW() api.CreateCommandData
type CommandContext ¶
type CommandContext struct { *sync.Mutex *gateway.InteractionCreateEvent Data *discord.CommandInteraction State *state.State // contains filtered or unexported fields }
func NewCommandContext ¶
func NewCommandContext(e *gateway.InteractionCreateEvent, state *state.State, data *discord.CommandInteraction, sended bool) *CommandContext
func (*CommandContext) Argument ¶
func (ctx *CommandContext) Argument(index int) *Argument
func (*CommandContext) Edit ¶
func (ctx *CommandContext) Edit(args ...interface{}) (msg *discord.Message, err error)
func (*CommandContext) Embed ¶
func (ctx *CommandContext) Embed(eb *utils.Embed) *CommandContext
func (*CommandContext) Ephemeral ¶
func (ctx *CommandContext) Ephemeral() *CommandContext
func (*CommandContext) File ¶
func (ctx *CommandContext) File(file sendpart.File) *CommandContext
func (*CommandContext) Guild ¶
func (ctx *CommandContext) Guild() *discord.Guild
func (*CommandContext) Reply ¶
func (ctx *CommandContext) Reply(args ...interface{})
func (*CommandContext) Stacktrace ¶
func (ctx *CommandContext) Stacktrace(err error)
func (*CommandContext) VoiceState ¶
func (ctx *CommandContext) VoiceState() *discord.VoiceState
Click to show internal directories.
Click to hide internal directories.