51 lines
1.1 KiB
Go
51 lines
1.1 KiB
Go
package interactions
|
|
|
|
import "git.sapphic.engineer/roleypoly/v4/types"
|
|
|
|
type Interaction struct {
|
|
ID string `json:"id"`
|
|
Member types.DiscordMember `json:"member"`
|
|
Data InteractionData `json:"data"`
|
|
GuildID string `json:"guild_id"`
|
|
AppPermissions uint64 `json:"app_permissions"`
|
|
Type uint64 `json:"type"`
|
|
Token string `json:"token"`
|
|
}
|
|
|
|
const (
|
|
TypePing uint64 = 1
|
|
TypeApplicationCommand uint64 = 2
|
|
)
|
|
|
|
type InteractionData struct {
|
|
Name string `json:"name"`
|
|
Options []InteractionOption `json:"options"`
|
|
}
|
|
|
|
type InteractionOption struct {
|
|
Name string `json:"name"`
|
|
Value string `json:"value"`
|
|
}
|
|
|
|
const (
|
|
ResponsePong = 1
|
|
ResponseChannelMessage = 4
|
|
ResponseDeferredChannelMessage = 5
|
|
)
|
|
|
|
type InteractionResponse struct {
|
|
Type int `json:"type"`
|
|
Data InteractionResponseData `json:"data"`
|
|
}
|
|
|
|
const (
|
|
FlagEphemeral = 1 << 6
|
|
)
|
|
|
|
type InteractionResponseData struct {
|
|
Content string
|
|
Embeds []Embed
|
|
Flags int
|
|
}
|
|
|
|
type Embed struct{}
|