forked from andersfylling/disgord
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinteraction.go
More file actions
78 lines (66 loc) · 2.14 KB
/
interaction.go
File metadata and controls
78 lines (66 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package disgord
type InteractionType = int
const (
_ InteractionType = iota
InteractionPing
InteractionApplicationCommand
InteractionMessageComponent
)
type OptionType = int
const (
_ OptionType = iota
SUB_COMMAND
SUB_COMMAND_GROUP
STRING
INTEGER
BOOLEAN
USER
CHANNEL
ROLE
MENTIONABLE
)
type InteractionCallbackType = int
const (
_ InteractionCallbackType = iota
Pong
_
_
ChannelMessageWithSource
DeferredChannelMessageWithSource
DeferredUpdateMessage
UpdateMessage
)
//TODO ApplicationCommandInteractionDataResolved https://discord.com/developers/docs/interactions/slash-commands#interaction-applicationcommandinteractiondataresolved
type ApplicationCommandInteractionDataResolved struct {
}
type ApplicationCommandInteractionDataOption struct {
Name string `json:"name"`
Type OptionType `json:"type"`
Options []*ApplicationCommandInteractionDataOption `json:"options"`
}
type ApplicationCommandInteractionData struct {
ID Snowflake `json:"id"`
Name string `json:"name"`
Resolved []*ApplicationCommandInteractionDataResolved `json:"resolved"`
Options []*ApplicationCommandInteractionDataOption `json:"options"`
CustomID string `json:"custom_id"`
Type MessageComponentType `json:"component_type"`
}
type MessageInteraction struct {
ID Snowflake `json:"id"`
Type InteractionType `json:"type"`
Name string `json:"name"`
User *User `json:"user"`
}
type InteractionApplicationCommandCallbackData struct {
Tts bool `json:"tts"`
Content string `json:"content"`
Embeds []*Embed `json:"embeds"`
Flags int `json:"flags"`
AllowedMentions *AllowedMentions `json:"allowed_mentions"`
Components []*MessageComponent `json:"components"`
}
type InteractionResponse struct {
Type InteractionCallbackType `json:"type"`
Data *InteractionApplicationCommandCallbackData `json:"data"`
}