From 9d03695362535e19f674bc7edf1f9c670df87fb7 Mon Sep 17 00:00:00 2001 From: aikaterna Date: Sun, 13 May 2018 10:51:45 -0700 Subject: [PATCH] Chatchart, async msg delete -> rewrite msg delete --- chatchart/chatchart.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chatchart/chatchart.py b/chatchart/chatchart.py index ffb56d9..4abd7cf 100644 --- a/chatchart/chatchart.py +++ b/chatchart/chatchart.py @@ -59,13 +59,13 @@ class Chatchart: channel = ctx.message.channel history = [] if not channel.permissions_for(ctx.message.author).read_messages == True: - await self.bot.delete_message(em) + await em.delete() return await ctx.send("You're not allowed to access that channel.") try: async for msg in channel.history(limit=messages): history.append(msg) except discord.errors.Forbidden: - await self.bot.delete_message(em) + await em.delete() return await ctx.send("No permissions to read that channel.") msg_data = {'total count': 0, 'users': {}}