-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
message.go
53 lines (48 loc) · 1.73 KB
/
message.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
package diskursus
import (
"time"
)
type Message struct {
ID string `json:"id"`
ChannelID string `json:"channel_id"`
GuildID string `json:"guild_id"`
Content string `json:"content"`
Author *User `json:"author"`
Flags int `json:"flags"`
Timestamp time.Time `json:"timestamp"`
EditedTimestamp *time.Time `json:"edited_timestamp"`
Tts bool `json:"tts"`
MentionEveryone bool `json:"mention_everyone"`
Mentions []User `json:"mentions"`
MentionsChannels []any `json:"mention_channels"`
Attachments []MesssageAttachment `json:"attachments"`
Components []MessageActionRow `json:"components"`
}
type MesssageAttachment struct {
Id string `json:"id"`
Filename string `json:"filename"`
Description string `json:"description"`
ContentType string `json:"content_type"`
Size int64 `json:"size"`
Url string `json:"url"`
ProxyUrl string `json:"proxy_url"`
Height int64 `json:"height"`
Width int64 `json:"width"`
Ephemeral bool `json:"ephemeral"`
DurationSec float64 `json:"duration_secs"`
Waveform string `json:"waveform"`
Flags int64 `json:"flags"`
}
type MessageActionRow struct {
Type int `json:"type"`
Components []MessageButton `json:"components"`
}
type MessageButton struct {
Type int `json:"type"`
Style int `json:"style"`
Label string `json:"label"`
Emoji any `json:"emoji"`
CustomID string `json:"custom_id"`
Url string `json:"url"`
Disabled bool `json:"disabled"`
}