Documentation ¶
Index ¶
Constants ¶
View Source
const ( PongInteractionCallbackType InteractionCallbackType = iota + 1 ChannelMessageWithSourceInteractionCallbackType = iota + 3 DeferredChannelMessageWithSourceInteractionCallbackType DeferredUpdateMessageInteractionCallbackType UpdateMessageInteractionCallbackType ApplicationCommandAutocompleteResultInteractionCallbackType ModalInteractionCallbackType )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutocompleteCallbackData ¶
type AutocompleteCallbackData struct {
Choices []commands.AutoCompleteChoice `json:"choices"`
}
type Interaction ¶
type Interaction struct { Id discord.Snowflake `json:"id"` ApplicationId discord.Snowflake `json:"application_id"` Type InteractionType `json:"type"` DataInternal *json.RawMessage `json:"data,omitempty"` Data InteractionData `json:"-"` GuildId *discord.Snowflake `json:"guild_id,omitempty"` ChannelId *discord.Snowflake `json:"channel_id,omitempty"` Member *discord.Member `json:"member,omitempty"` User *discord.User `json:"user,omitempty"` Token string `json:"token"` Version int `json:"version"` }
func Parse ¶
func Parse(data string) (interaction *Interaction, err error)
func (*Interaction) IsPing ¶
func (interaction *Interaction) IsPing() bool
type InteractionCallbackData ¶
type InteractionCallbackData interface { }
type InteractionCallbackType ¶
type InteractionCallbackType uint8
type InteractionData ¶
type InteractionData interface { }
type InteractionResponse ¶
type InteractionResponse struct { Type InteractionCallbackType `json:"type"` Data InteractionCallbackData `json:"data,omitempty"` }
func CreateDeferEditResponse ¶ added in v0.1.1
func CreateDeferEditResponse() InteractionResponse
func CreateDeferMessageResponse ¶ added in v0.1.1
func CreateDeferMessageResponse() InteractionResponse
func CreatePongResponse ¶ added in v0.1.1
func CreatePongResponse() InteractionResponse
func (InteractionResponse) ToAPIGatewayResponse ¶ added in v0.1.1
func (ir InteractionResponse) ToAPIGatewayResponse() events.APIGatewayProxyResponse
type InteractionType ¶
type InteractionType uint8
const ( PingInteractionType InteractionType = iota + 1 ApplicationCommandInteractionType MessageComponentInteractionType ApplicationCommandAutocompleteInteractionType ModalSubmitInteractionType )
type MessageCallbackData ¶
type MessageCallbackData struct { TTS *bool `json:"tts,omitempty"` Content *string `json:"content,omitempty"` Embeds []discord.Embed `json:"embeds,omitempty"` AllowedMentions *discord.AllowedMentions `json:"allowed_mentions,omitempty"` Flags *int `json:"flags,omitempty"` Components []components.MessageComponent `json:"components,omitempty"` Attachments []discord.Attachment `json:"attachments,omitempty"` }
type ModalCallback ¶
type ModalCallback struct { CustomId string `json:"custom_id"` Title string `json:"title"` Components []components.MessageComponent `json:"components"` }
Click to show internal directories.
Click to hide internal directories.