-
Notifications
You must be signed in to change notification settings - Fork 0
/
message.go
51 lines (44 loc) · 1.45 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
package webhook
type Message struct {
Username string `json:"username,omitempty"`
AvatarUrl string `json:"avatar_url,omitempty"`
Content string `json:"content,omitempty"`
Embeds []Embed `json:"embeds,omitempty"`
}
type Embed struct {
Author *Author `json:"author,omitempty"`
Title string `json:"title,omitempty"`
Url string `json:"url,omitempty"`
Description string `json:"description,omitempty"`
Color uint32 `json:"color,omitempty"`
Fields []Field `json:"fields,omitempty"`
Thumbnail *Media `json:"thumbnail,omitempty"`
Image *Media `json:"image,omitempty"`
Video *Media `json:"video,omitempty"`
Footer *Footer `json:"footer,omitempty"`
Provider *Provider `json:"provider,omitempty"`
}
type Author struct {
Name string `json:"name,omitempty"`
Url string `json:"url,omitempty"`
IconUrl string `json:"icon_url,omitempty"`
}
type Field struct {
Name string `json:"name,omitempty"`
Value string `json:"value,omitempty"`
Inline bool `json:"inline,omitempty"`
}
type Media struct {
Url string `json:"url,omitempty"`
ProxyUrl string `json:"proxy_url,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
}
type Footer struct {
Text string `json:"text,omitempty"`
IconUrl string `json:"icon_url,omitempty"`
}
type Provider struct {
Name string `json:"name,omitempty"`
Url string `json:"url,omitempty"`
}