diff --git a/discord/bot.go b/discord/bot.go index a7bdc37..300c48b 100644 --- a/discord/bot.go +++ b/discord/bot.go @@ -29,7 +29,10 @@ func Bot() { // DMIntents: disgord.IntentDirectMessages | disgord.IntentDirectMessageReactions | disgord.IntentDirectMessageTyping, }) - defer client.Gateway().StayConnectedUntilInterrupted() + defer func() { + err := client.Gateway().StayConnectedUntilInterrupted() + common.CheckErr(err, "stay bot connection") + }() filter, _ := std.NewMsgFilter(ctx, client)