aboutsummaryrefslogtreecommitdiff
path: root/cogs
diff options
context:
space:
mode:
authorSkycloudd <51929172+Skycloudd@users.noreply.github.com>2020-06-20 20:04:13 +0000
committerGitHub <noreply@github.com>2020-06-20 20:04:13 +0000
commitc2974768028af1cf9973c77835e614f8ab1835de (patch)
tree488ada324a6e32c3e06d063c3d0fdea4d67eb0cc /cogs
parent931d4706d20e3a14ac0bc93b8f22917f04506a01 (diff)
downloadsteve-bot-c2974768028af1cf9973c77835e614f8ab1835de.tar
steve-bot-c2974768028af1cf9973c77835e614f8ab1835de.tar.gz
steve-bot-c2974768028af1cf9973c77835e614f8ab1835de.tar.bz2
steve-bot-c2974768028af1cf9973c77835e614f8ab1835de.tar.lz
steve-bot-c2974768028af1cf9973c77835e614f8ab1835de.tar.xz
steve-bot-c2974768028af1cf9973c77835e614f8ab1835de.tar.zst
steve-bot-c2974768028af1cf9973c77835e614f8ab1835de.zip
fixed TypeError in on_message_edit
When an embed gets loaded, discord sends out the message edited event, and because of that it gets weird. so you just check if the content of the message actually changed, and that should fix it.
Diffstat (limited to 'cogs')
-rw-r--r--cogs/logs.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cogs/logs.py b/cogs/logs.py
index 8230ccc..c1b3a49 100644
--- a/cogs/logs.py
+++ b/cogs/logs.py
@@ -32,6 +32,9 @@ class Logs(commands.Cog):
@commands.Cog.listener()
async def on_message_edit(self, before, after):
+ if before.content == after.content:
+ return
+
if after.guild.id != 574267523869179904:
return
channel = self.bot.get_channel(int(self.bot.config[str(before.guild.id)]["logs_channel"]))