Only post startup message to Discord if env var POCKETBOT_STARTUP_MESSAGE is TRUE

pull/20/head
pocketjawa 2020-04-26 02:10:20 -04:00
parent 6cd0a56e26
commit c5b91113a3
1 changed files with 3 additions and 1 deletions

View File

@ -81,5 +81,7 @@ func main() {
func ready(s *discordgo.Session, event *discordgo.Ready) {
s.UpdateStatus(0, "with droids!")
s.ChannelMessageSend(bot_channel, "This isn't Tatooine...")
if os.Getenv("POCKETBOT_STARTUP_MESSAGE") == "TRUE" {
s.ChannelMessageSend(bot_channel, "This isn't Tatooine...")
}
}