interactions yay!!
This commit is contained in:
parent
b9a05bedf9
commit
f60033a3e4
30 changed files with 716 additions and 44 deletions
50
interactions/types.go
Normal file
50
interactions/types.go
Normal file
|
@ -0,0 +1,50 @@
|
|||
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"`
|
||||
}
|
||||
|
||||
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{}
|
Loading…
Add table
Add a link
Reference in a new issue