-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommand_structs.go
75 lines (69 loc) · 2.41 KB
/
command_structs.go
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
package haccerinteractions
import (
"github.com/bwmarrin/discordgo"
)
type Command struct {
Type int `json:"type"`
ID string `json:"id"`
ApplicationID string `json:"application_id"`
Name string `json:"name"`
Version string `json:"version"`
Options []CommandOption `json:"options"`
IntegrationTypes []int `json:"integration_types"`
GlobalPopularityRank int `json:"global_popularity_rank"`
}
type GuildChannel struct {
GuildID string
ChannelID string
}
type commandRunRequest struct {
Type int `json:"type"`
BotID string `json:"application_id"`
GuildID string `json:"guild_id"`
ChannelID string `json:"channel_id"`
SessionID string `json:"session_id"`
Data commandRunData `json:"data"`
}
type commandRunData struct {
ID string `json:"id"`
Type int `json:"type"`
Name string `json:"name"`
Version string `json:"version"`
Options []CommandRunOption `json:"options"`
}
type CommandRunOption struct {
Type int `json:"type"`
Name string `json:"name"`
Value string `json:"value"`
Options []CommandRunOption `json:"options"`
}
type CommandSearchResponse struct {
Commands []Command `json:"application_commands"`
Applications []Application `json:"applications"`
}
type Application struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
BotID string `json:"bot_id"`
}
type CommandOption struct {
Type int `json:"type"`
Name string `json:"name"`
}
type ComponentInteractRequest struct {
Type discordgo.InteractionType `json:"type"`
Flags int `json:"message_flags"`
SessionID string `json:"session_id"`
Nonce string `json:"nonce"`
GuildID string `json:"guild_id"`
ChannelID string `json:"channel_id"`
MessageID string `json:"message_id"`
BotID string `json:"application_id"`
Data interface{} `json:"data"`
}
type ButtonClickRequestData struct{}
type SelectMenuSelectRequestData struct {
Type discordgo.SelectMenuType `json:"type"`
Values []string `json:"values"`
}