From c2974768028af1cf9973c77835e614f8ab1835de Mon Sep 17 00:00:00 2001 From: Skycloudd <51929172+Skycloudd@users.noreply.github.com> Date: Sat, 20 Jun 2020 22:04:13 +0200 Subject: 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. --- cogs/logs.py | 3 +++ 1 file changed, 3 insertions(+) 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"])) -- cgit v1.2.3