|
|
@ -39,10 +39,6 @@ func RecalculateEverything(dg *discordgo.Session, guildID string) {
|
|
|
|
util.ReportError(dg, err)
|
|
|
|
util.ReportError(dg, err)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if beforeID == "" && len(messages) > 0 && messages[0].ID != latestMessage[v.ID] {
|
|
|
|
|
|
|
|
newMessagesFound = true
|
|
|
|
|
|
|
|
latestMessage[v.ID] = messages[0].ID
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
dupe := false
|
|
|
|
dupe := false
|
|
|
|
for _, msg := range messages {
|
|
|
|
for _, msg := range messages {
|
|
|
|
if msg.ID == latestMessage[v.ID] {
|
|
|
|
if msg.ID == latestMessage[v.ID] {
|
|
|
@ -55,6 +51,10 @@ func RecalculateEverything(dg *discordgo.Session, guildID string) {
|
|
|
|
listOfMessages[msg.Author.ID] = []*discordgo.Message{msg}
|
|
|
|
listOfMessages[msg.Author.ID] = []*discordgo.Message{msg}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if beforeID == "" && len(messages) > 0 && messages[0].ID != latestMessage[v.ID] {
|
|
|
|
|
|
|
|
newMessagesFound = true
|
|
|
|
|
|
|
|
latestMessage[v.ID] = messages[0].ID
|
|
|
|
|
|
|
|
}
|
|
|
|
if len(messages) < 100 || dupe {
|
|
|
|
if len(messages) < 100 || dupe {
|
|
|
|
break
|
|
|
|
break
|
|
|
|
}
|
|
|
|
}
|
|
|
|