/
config.go
109 lines (85 loc) · 1.98 KB
/
config.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
package common
import "github.com/diamondburned/arikawa/v3/discord"
type (
ToggleableModule struct {
Enabled bool
}
Config struct {
Bot *BotConfig
Database *DatabaseConfig
UpdateTracker *UpdateTrackerConfig
MaxDownloadVer int
MinDownloadVer int
ApkCacheDir string
Port string
Origin string
}
BotConfig struct {
ToggleableModule
Token string
OwnerIDs []discord.UserID
RoleIDs *RoleIDsConfig
Starboard *StarboardConfig
AutoPublish bool
TrollSupportRole *TrollSupportRoleConfig
VoiceTextChatLocker *VoiceTextChatLockerConfig
AntiNitroScam bool
NormalizeNicknames bool
AutoReplyConfig *AutoReplyConfig
ApkCacheDir string `json:"-"`
}
RoleIDsConfig struct {
ModRole discord.RoleID
SupportMuted discord.RoleID
PrdMuted discord.RoleID
DevMuted discord.RoleID
ReactionMuted discord.RoleID
AttachmentMuted discord.RoleID
}
StarboardConfig struct {
ToggleableModule
Channel discord.ChannelID
Ignore []discord.ChannelID
Min int
}
TrollSupportRoleConfig struct {
ToggleableModule
ID discord.RoleID
}
VoiceTextChatLockerConfig struct {
ToggleableModule
Voice discord.ChannelID
Text discord.ChannelID
}
DatabaseConfig struct {
Addr string
User string
Password string
DB string
}
UpdateTrackerConfig struct {
ToggleableModule
Cache string
IgnoreFirstUpdate bool
Webhook *UpdateWebhookConfig
GooglePlay map[string]GooglePlayChannelConfig
}
UpdateWebhookConfig struct {
ToggleableModule
ID discord.WebhookID
Token string
}
GooglePlayChannelConfig struct {
Email string
AASToken string
Webhook bool
}
AutoReplyConfig struct {
ToggleableModule
IgnoredRoles []discord.RoleID
PRD discord.ChannelID
PluginsList discord.ChannelID
NewPlugins discord.ChannelID
SupportCategory discord.ChannelID
}
)