Browse Source

Added config sample, and removed old config commands

hkremer/rebranding
Gregory Rudolph 4 years ago
parent
commit
388b34eded
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 17
      config.json.sample
  2. 15
      main.go

17
config.json.sample

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
{
"GuildID": "",
"AdminChannel": "",
"AdminRole": "",
"MonitorRole": "",
"IntroChann": "",
"MonitorChann": "",
"VerifiedRole": "",
"BumpTime": "",
"LastBumper": "",
"Stats": {
"374988675546873886": 80
},
"Unverified": {},
"Verifications": {},
"Probations": {}
}

15
main.go

@ -58,7 +58,6 @@ func main() { @@ -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) { @@ -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)

Loading…
Cancel
Save