From a551a10e59bfa9a84dab7daa01f75cb1d607cdde Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Thu, 8 Sep 2022 02:28:58 -0500 Subject: [PATCH] Shorten an error check --- bot/bot.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bot/bot.go b/bot/bot.go index 35b8eb5..b19b52f 100644 --- a/bot/bot.go +++ b/bot/bot.go @@ -97,8 +97,7 @@ func Run() error { dg.Identify.Intents = discordgo.IntentsGuildMessages | discordgo.IntentsDirectMessages - err = dg.Open() - if err != nil { + if err = dg.Open(); err != nil { log.Fatalf("error opening connection: %v\n", err) }