From 80d68684fb78b0cf4c9dd7ef03ab1dfc354ee685 Mon Sep 17 00:00:00 2001 From: Tobotimus Date: Sun, 31 Dec 2017 11:29:07 +1100 Subject: [PATCH] [V3 Context] Fix ctx.send_interactive in DM (#1221) Fixes #1220 --- redbot/core/context.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/redbot/core/context.py b/redbot/core/context.py index d702c8b88..026f998a4 100644 --- a/redbot/core/context.py +++ b/redbot/core/context.py @@ -118,8 +118,9 @@ class RedContext(commands.Context): else: try: await self.channel.delete_messages((query, resp)) - except discord.HTTPException: + except (discord.HTTPException, AttributeError): # In case the bot can't delete other users' messages, # or is not a bot account + # or chanel is a DM await query.delete() return ret