diff --git a/src/pluralkit/bot/commands/misc_commands.py b/src/pluralkit/bot/commands/misc_commands.py index fc3112d9..ee28836c 100644 --- a/src/pluralkit/bot/commands/misc_commands.py +++ b/src/pluralkit/bot/commands/misc_commands.py @@ -52,6 +52,8 @@ async def invite_link(ctx: CommandContext): async def export(ctx: CommandContext): + working_msg = await ctx.message.channel.send("Working...") + system = await ctx.ensure_system() members = await system.get_members(ctx.conn) @@ -76,7 +78,8 @@ async def export(ctx: CommandContext): "description": member.description, "prefix": member.prefix, "suffix": member.suffix, - "created": member.created.isoformat() + "created": member.created.isoformat(), + "message_count": await member.message_count(ctx.conn) } for member in members ], "accounts": [str(uid) for uid in accounts], @@ -88,8 +91,10 @@ async def export(ctx: CommandContext): ] # TODO: messages } + await working_msg.delete() + f = io.BytesIO(json.dumps(data).encode("utf-8")) - await ctx.message.channel.send(content="Here you go!", file=discord.File(fp=f, filename="system.json")) + await ctx.message.channel.send(content="Here you go!", file=discord.File(fp=f, filename="pluralkit_system.json")) async def tell(ctx: CommandContext):