-
Notifications
You must be signed in to change notification settings - Fork 2
/
bot.go
49 lines (36 loc) · 1.1 KB
/
bot.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
package revoltgo
type Bot struct {
ID string `json:"_id"`
// User ID of the bot owner
Owner string `json:"owner"`
// Token used to authenticate requests for this bot
Token string `json:"token"`
// Whether the bot is public (may be invited by anyone)
Public bool `json:"public"`
// Whether to enable analytics
Analytics bool `json:"analytics"`
// Whether this bot should be publicly discoverable
Discoverable bool `json:"discoverable"`
// Reserved; URL for handling interactions
InteractionsURL string `json:"interactions_url"`
// URL for terms of service
TermsOfServiceURL string `json:"terms_of_service_url"`
// URL for privacy policy
PrivacyPolicyURL string `json:"privacy_policy_url"`
// Enum of bot flags
Flags int `json:"flags"`
}
type PublicBot struct {
ID string `json:"_id"`
Username string `json:"username"`
Avatar *Attachment `json:"avatar"`
Description string `json:"description"`
}
type FetchedBot struct {
Bot *Bot `json:"bot"`
User *User `json:"user"`
}
type FetchedBots struct {
Bots []*Bot `json:"bots"`
Users []*User `json:"users"`
}