From a51fe5e759ba0e3a02f4c629a6022dc21184a88d Mon Sep 17 00:00:00 2001 From: xBelladonna Date: Sun, 21 Apr 2019 23:51:04 +0930 Subject: [PATCH] Don't drink and code kids --- src/pluralkit/bot/commands/misc_commands.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pluralkit/bot/commands/misc_commands.py b/src/pluralkit/bot/commands/misc_commands.py index 3941bcf5..be10ee9d 100644 --- a/src/pluralkit/bot/commands/misc_commands.py +++ b/src/pluralkit/bot/commands/misc_commands.py @@ -158,13 +158,11 @@ async def export(ctx: CommandContext): await working_msg.delete() f = io.BytesIO(json.dumps(data).encode("utf-8")) - export_msg = ctx.message.author.send(content="Here you go! \u2709", file=discord.File(fp=f, filename="pluralkit_system.json")) - if isinstance(ctx.message.channel, discord.DMChannel): - await export_msg - else: + if not isinstance(ctx.message.channel, discord.DMChannel): await ctx.reply_ok("DM'd!") - await export_msg + + await ctx.message.author.send(content="Here you go! \u2709", file=discord.File(fp=f, filename="pluralkit_system.json")) async def tell(ctx: CommandContext):