From 388b34eded6548024a7e0457abb06a2199184bcf Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Thu, 29 Oct 2020 21:42:16 -0400 Subject: [PATCH] Added config sample, and removed old config commands --- config.json.sample | 17 +++++++++++++++++ main.go | 15 --------------- 2 files changed, 17 insertions(+), 15 deletions(-) create mode 100644 config.json.sample diff --git a/config.json.sample b/config.json.sample new file mode 100644 index 0000000..acaec3f --- /dev/null +++ b/config.json.sample @@ -0,0 +1,17 @@ +{ + "GuildID": "", + "AdminChannel": "", + "AdminRole": "", + "MonitorRole": "", + "IntroChann": "", + "MonitorChann": "", + "VerifiedRole": "", + "BumpTime": "", + "LastBumper": "", + "Stats": { + "374988675546873886": 80 + }, + "Unverified": {}, + "Verifications": {}, + "Probations": {} +} \ No newline at end of file diff --git a/main.go b/main.go index f00cdf8..aed61f7 100644 --- a/main.go +++ b/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)