From 28b840deb0cb3d097b52070b13aeb0a62eb22eb9 Mon Sep 17 00:00:00 2001 From: Matthieu Lalonde Date: Thu, 28 Jan 2021 18:37:20 +0000 Subject: [PATCH] Typo and small timing fix. --- pkg/bot/handlers.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/bot/handlers.go b/pkg/bot/handlers.go index 0118037..3411df3 100644 --- a/pkg/bot/handlers.go +++ b/pkg/bot/handlers.go @@ -245,7 +245,7 @@ func (b *Type) handleStatusCheck(ds *discordgo.Session, dm *discordgo.Message, c if e != "" { msg += e + " " } - msg += au.GetDisplayName() + "is current online" + msg += au.GetDisplayName() + " is current online" if au.CurrentSpace.Name != "" { msg += " in " + au.CurrentSpace.Name } @@ -554,14 +554,8 @@ func (b *Type) handleForceCheck(ds *discordgo.Session, dm *discordgo.Message, ct uu, _ := b.getUserByDiscordID(dm.Author.ID) log.Println("Checking for incoming friendship request") fr, _ := b.avr.FetchPendingFriendshipRequests() - if len(fr) > 0 { - b.handleNewFriendshipRequests(fr) - } log.Println("Checking for conversations") pm, _ := b.avr.FetchPendingConversations() - if len(pm) > 0 { - b.handleNewPendingConversation(pm) - } b.dg.Session.ChannelMessageSendReply(dm.ChannelID, b.getMessageString("all_done", uu), &discordgo.MessageReference{ @@ -569,6 +563,12 @@ func (b *Type) handleForceCheck(ds *discordgo.Session, dm *discordgo.Message, ct ChannelID: dm.ChannelID, GuildID: dm.GuildID, }) + if len(fr) > 0 { + b.handleNewFriendshipRequests(fr) + } + if len(pm) > 0 { + b.handleNewPendingConversation(pm) + } } /*