Typo and small timing fix.

master
Matthieu Lalonde 5 years ago
parent 1266eead01
commit 28b840deb0

@ -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)
}
}
/*

Loading…
Cancel
Save