From cf5a63a5d5180da5ebba01c2614504d52daeb137 Mon Sep 17 00:00:00 2001 From: retke Date: Fri, 23 Mar 2018 00:08:57 +0100 Subject: [PATCH] [V3] Set token command fix (#1449) * [V3] Add set token command * DM check * warning message + delete if token isn't send in DM * Update string formatting * fix condition invertion --- redbot/core/core_commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/redbot/core/core_commands.py b/redbot/core/core_commands.py index 745df6b77..be5a32481 100644 --- a/redbot/core/core_commands.py +++ b/redbot/core/core_commands.py @@ -744,7 +744,8 @@ class Core: @checks.is_owner() async def token(self, ctx, token: str): """Change bot token.""" - if not not isinstance(ctx.channel, discord.DMChannel): + + if not isinstance(ctx.channel, discord.DMChannel): try: await ctx.message.delete()