Documentation ¶
Index ¶
- func Close(s *discordgo.Session) error
- func ErrorResponse(s Session, i *discordgo.InteractionCreate, err error) error
- func HandleInteractionCreate(commands map[string]*SlashCommand) func(*discordgo.Session, *discordgo.InteractionCreate)
- func NewSession(token string, intents discordgo.Intent) (*discordgo.Session, error)
- func Open(s *discordgo.Session) (*discordgo.Session, error)
- func OverwriteAndHandleCommands(commands ...*SlashCommand) func(*discordgo.Session) (*discordgo.Session, error)
- func OverwriteCommands(s *discordgo.Session, newCommands map[string]*SlashCommand) error
- func UpdateStatus(idle int, msg string) func(*discordgo.Session) (*discordgo.Session, error)
- type Handler
- type Session
- type SlashCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorResponse ¶
func ErrorResponse(s Session, i *discordgo.InteractionCreate, err error) error
func HandleInteractionCreate ¶
func HandleInteractionCreate(commands map[string]*SlashCommand) func(*discordgo.Session, *discordgo.InteractionCreate)
func NewSession ¶
func OverwriteCommands ¶
func OverwriteCommands(s *discordgo.Session, newCommands map[string]*SlashCommand) error
Types ¶
type Session ¶
type Session interface { InteractionRespond(i *discordgo.Interaction, ir *discordgo.InteractionResponse, opts ...discordgo.RequestOption) error FollowupMessageCreate(i *discordgo.Interaction, waitResponse bool, params *discordgo.WebhookParams, opts ...discordgo.RequestOption) (*discordgo.Message, error) }
type SlashCommand ¶
type SlashCommand struct { *discordgo.ApplicationCommand // contains filtered or unexported fields }
func NewCommand ¶
func NewCommand(command *discordgo.ApplicationCommand, handler Handler) *SlashCommand
Click to show internal directories.
Click to hide internal directories.