From d1d3a1f9e600d11727d5960e721641565ff9b21a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dawid=20Wysoki=C5=84ski?= Date: Fri, 28 Oct 2022 05:38:52 +0200 Subject: [PATCH] feat: bot status --- internal/discord/bot.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/discord/bot.go b/internal/discord/bot.go index fac1ff7..446e79b 100644 --- a/internal/discord/bot.go +++ b/internal/discord/bot.go @@ -43,6 +43,8 @@ func NewBot(token string, groupSvc GroupService, monitorSvc MonitorService, clie return nil, fmt.Errorf("discordgo.New: %w", err) } + s.Identify.Intents = discordgo.IntentsNone + b := &Bot{ s: s, c: cron.New( @@ -56,9 +58,7 @@ func NewBot(token string, groupSvc GroupService, monitorSvc MonitorService, clie choiceSvc: client, } - b.s.Identify.Intents = discordgo.IntentsNone - - s.AddHandler(b.handleSessionReady) + b.s.AddHandler(b.handleSessionReady) return b, nil }