Added config sample, and removed old config commands
This commit is contained in:
17
config.json.sample
Normal file
17
config.json.sample
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"GuildID": "",
|
||||
"AdminChannel": "",
|
||||
"AdminRole": "",
|
||||
"MonitorRole": "",
|
||||
"IntroChann": "",
|
||||
"MonitorChann": "",
|
||||
"VerifiedRole": "",
|
||||
"BumpTime": "",
|
||||
"LastBumper": "",
|
||||
"Stats": {
|
||||
"374988675546873886": 80
|
||||
},
|
||||
"Unverified": {},
|
||||
"Verifications": {},
|
||||
"Probations": {}
|
||||
}
|
||||
15
main.go
15
main.go
@ -58,7 +58,6 @@ func main() {
|
||||
defer log.PanicSafe()
|
||||
if configFile == "" {
|
||||
configFile = "config.json"
|
||||
log.LogCritical(fmt.Sprintf("SetupToken: %+v\nRebootToken: %+v", setupToken, rebootToken))
|
||||
} else {
|
||||
loadConfig()
|
||||
}
|
||||
@ -374,20 +373,6 @@ func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {
|
||||
go bumpTimer(s)
|
||||
return
|
||||
}
|
||||
if config.AdminChannel == "" {
|
||||
if !strings.HasPrefix(m.Content, setupToken) {
|
||||
return
|
||||
}
|
||||
config.GuildID = m.GuildID
|
||||
setAdminChannel(s, m)
|
||||
return
|
||||
} else if config.MonitorChann == "" {
|
||||
if !strings.HasPrefix(m.Content, setupToken) {
|
||||
return
|
||||
}
|
||||
setMonitorChann(s, m)
|
||||
return
|
||||
}
|
||||
if m.ChannelID == config.AdminChannel {
|
||||
if strings.HasPrefix(m.Content, rebootToken) {
|
||||
exit(s)
|
||||
|
||||
Reference in New Issue
Block a user