Don't log message edits if the After is blank (problem with message embeds)
Some checks are pending
CI / build (push) Waiting to run
Some checks are pending
CI / build (push) Waiting to run
This commit is contained in:
parent
37e8fa52af
commit
3d4518f961
@ -29,6 +29,9 @@ func OnMessageUpdate(session *discordgo.Session, m *discordgo.MessageUpdate) {
|
|||||||
log.Println(err)
|
log.Println(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if m.Content == "" {
|
||||||
|
return
|
||||||
|
}
|
||||||
embed := &discordgo.MessageEmbed{
|
embed := &discordgo.MessageEmbed{
|
||||||
Title: fmt.Sprintf("Message Edited: %v", msg.ID),
|
Title: fmt.Sprintf("Message Edited: %v", msg.ID),
|
||||||
Description: fmt.Sprintf("**Before:** %v\n**After:** %v\nIn Channel: %v", msg.Content, m.Content, channel.Mention()),
|
Description: fmt.Sprintf("**Before:** %v\n**After:** %v\nIn Channel: %v", msg.Content, m.Content, channel.Mention()),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user