Only post startup messages if env var BUTTSBOT_STARTUP_MESSAGE is set to TRUE.

dev
pocketjawa 2020-04-29 23:52:42 -04:00
parent c5fea4ba83
commit cf0385463c
1 changed files with 3 additions and 1 deletions

View File

@ -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) {