Versions in this module Expand all Collapse all v0 v0.1.4 Apr 18, 2021 v0.1.3 Apr 2, 2021 v0.1.2 Apr 2, 2021 v0.1.1 Apr 2, 2021 v0.1.0 Apr 2, 2021 Changes in this version + func Handler(key string, commands []*Command) (http.Handler, error) + type ApplicationCommand struct + ApplicationID string + ID string + type ApplicationCommandInteractionData struct + ID string + Name string + Options []*ApplicationCommandInteractionDataOption + type ApplicationCommandInteractionDataOption struct + Name string + Options []*ApplicationCommandInteractionDataOption + Value interface{} + func (o ApplicationCommandInteractionDataOption) ValueBool() bool + func (o ApplicationCommandInteractionDataOption) ValueInt() int + func (o ApplicationCommandInteractionDataOption) ValueString() string + type ApplicationCommandOption struct + Choices []*ApplicationCommandOptionChoice + Description string + Name string + Options []*ApplicationCommandOption + Required bool + Type ApplicationCommandOptionType + type ApplicationCommandOptionChoice struct + Name string + Value interface{} + type ApplicationCommandOptionType int + const BooleanACOT + const ChannelACOT + const IntegerACOT + const RoleACOT + const StringACOT + const SubCommandACOT + const SubCommandGroupACOT + const UserACOT + type CallbackFlags int + const EphemeralCF + const NoneCF + type Client struct + func NewClient(clientID, clientSecret string, opts ...ClientOption) *Client + func (c *Client) BulkOverwriteGlobalApplicationCommands(ctx context.Context, cmd []*CreateApplicationCommand) ([]*ApplicationCommand, error) + func (c *Client) BulkOverwriteGuildApplicationCommands(ctx context.Context, guildID string, cmd []*CreateApplicationCommand) ([]*ApplicationCommand, error) + func (c *Client) CreateFollowupMessage(ctx context.Context, interactionToken string, interaction *webhook.Webhook) error + func (c *Client) CreateGlobalApplicationCommand(ctx context.Context, cmd *CreateApplicationCommand) (*ApplicationCommand, error) + func (c *Client) CreateGuildApplicationCommand(ctx context.Context, guildID string, cmd *CreateApplicationCommand) (*ApplicationCommand, error) + func (c *Client) CreateInteractionResponse(ctx context.Context, interactionID, interactionToken string, ...) error + func (c *Client) DeleteFollowupMessage(ctx context.Context, interactionToken, messageID string) error + func (c *Client) DeleteGlobalApplicationCommand(ctx context.Context, cmdID string) error + func (c *Client) DeleteGuildApplicationCommand(ctx context.Context, guildID, cmdID string) error + func (c *Client) DeleteInteractionResponse(ctx context.Context, interactionToken string) error + func (c *Client) EditFollowupMessage(ctx context.Context, interactionToken, messageID string, ...) error + func (c *Client) EditInteractionResponse(ctx context.Context, interactionToken string, interaction *WebhookEdit) error + func (c *Client) GetGlobalApplicationCommand(ctx context.Context, cmdID string) (*ApplicationCommand, error) + func (c *Client) GetGlobalApplicationCommands(ctx context.Context) ([]*ApplicationCommand, error) + func (c *Client) GetGuildApplicationCommand(ctx context.Context, guildID, cmdID string) (*ApplicationCommand, error) + func (c *Client) GetGuildApplicationCommands(ctx context.Context, guildID string) ([]*ApplicationCommand, error) + func (c *Client) OAuthURL() string + func (c *Client) UpdateGlobalApplicationCommand(ctx context.Context, cmdID string, cmd *CreateApplicationCommand) (*ApplicationCommand, error) + func (c *Client) UpdateGuildApplicationCommand(ctx context.Context, guildID, cmdID string, cmd *CreateApplicationCommand) (*ApplicationCommand, error) + type ClientOption func(*Client) + func WithHTTP(client *http.Client) ClientOption + type Command struct + Handle CommandHandleFunc + ID string + type CommandHandleFunc func(*Interaction) (*InteractionResponse, error) + type CreateApplicationCommand struct + Description string + Name string + Options []*ApplicationCommandOption + type Interaction struct + ChannelID string + Data *ApplicationCommandInteractionData + GuildID string + ID string + Member *Member + Token string + Type InteractionType + User *User + Version int + type InteractionApplicationCommandCallbackData struct + AllowedMentions *embed.AllowedMentions + Content string + Embeds []*embed.Embed + Flags CallbackFlags + TTS bool + type InteractionResponse struct + Data *InteractionApplicationCommandCallbackData + Type InteractionResponseType + type InteractionResponseType int + const ChannelMessageWithSourceIRT + const DeferredChannelMessageWithSourceIRT + const PongIRT + type InteractionType int + const ApplicationCommandIT + const PingIT + type Member struct + Deaf bool + JoinedAt string + Mute bool + Nick string + Pending bool + Permissions string + PremiumSince string + Roles []string + User *User + type PremiumType int + const Nitro + const NitroClassic + const NonePT + type User struct + Avatar string + Bot bool + Discriminator string + Email string + Flags UserFlags + ID string + Locale string + MFAEnabled bool + PremiumType PremiumType + PublicFlags UserFlags + System bool + Username string + Verified bool + type UserFlags int + const BugHunterLevel1UF + const BugHunterLevel2UF + const DiscordEmployeeUF + const EarlySupporterUF + const EarlyVerifiedBotDeveloperUF + const HouseBalanceUF + const HouseBraveryUF + const HouseBrillianceUF + const HypeSquadEventsUF + const NoneUF + const PartneredServerOwnerUF + const SystemUF + const TeamUserUF + const VerifiedBotUF + func (u UserFlags) Has(f UserFlags) bool + type WebhookEdit struct + AllowedMentions *embed.AllowedMentions + Content string + Embeds []*embed.Embed