Make sure HasBeenRead never returns false when you sent the last message
MODIFY
readstate/readmarkers.go
readstate/readmarkers.go
@@ -173,6 +173,10 @@ func HasBeenRead(channel *discordgo.Channel, lastMessageID string) bool {
return true
}
+ if len(channel.Messages) > 0 && channel.Messages[0].Author.ID == state.User.ID {
+ return true
+ }
+
data, present := data[channel.ID]
if !present {
return false

Make sure HasBeenRead never returns false when you sent the last message