From cf0385463cceff94b195f2c2a844336777fc9450 Mon Sep 17 00:00:00 2001 From: pocketjawa Date: Wed, 29 Apr 2020 23:52:42 -0400 Subject: [PATCH] Only post startup messages if env var BUTTSBOT_STARTUP_MESSAGE is set to TRUE. --- buttsbot.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/buttsbot.go b/buttsbot.go index 75a765f..0d2ab94 100644 --- a/buttsbot.go +++ b/buttsbot.go @@ -68,7 +68,9 @@ func ready(s *discordgo.Session, event *discordgo.Ready) { os.Exit(0) } s.UpdateStatus(0, "with butts!") - s.ChannelMessageSend(botChannel, "This isn't a butt...") + if os.Getenv("BUTTSBOT_STARTUP_MESSAGE") == "TRUE" { + s.ChannelMessageSend(bot_channel, "This isn't a butt...") + } } func messageCreate(s *discordgo.Session, m *discordgo.MessageCreate) {