[Mod] Ignore embeds in repetition filter

Fixes #590
This commit is contained in:
Twentysix 2017-01-25 23:44:09 +01:00
parent 143d41f2f2
commit 14dbff6dd4

View File

@ -1229,12 +1229,12 @@ class Mod:
if server.id not in self.settings:
return False
if self.settings[server.id]["delete_repeats"]:
if not message.content:
return False
self.cache[author].append(message)
msgs = self.cache[author]
if len(msgs) == 3 and \
msgs[0].content == msgs[1].content == msgs[2].content:
if any([m.attachments for m in msgs]):
return False
try:
await self.bot.delete_message(message)
return True