Various bug fixes

This commit is contained in:
Ske
2018-11-08 16:25:58 +01:00
parent 3fca071c1d
commit f4512fc7e9
4 changed files with 26 additions and 25 deletions

View File

@@ -36,7 +36,7 @@ async def message_info(ctx: CommandContext):
original_sender = None
embed = discord.Embed()
embed.timestamp = discord.utils.snowflake_time(str(mid))
embed.timestamp = discord.utils.snowflake_time(mid)
embed.colour = discord.Colour.blue()
if message.system_name:
@@ -55,8 +55,7 @@ async def message_info(ctx: CommandContext):
embed.add_field(name="Sent by", value=sender_name)
message_content = await get_message_contents(ctx.client, message.channel, message.mid)
if message_content:
embed.description = message_content
embed.description = message_content or "(unknown, message deleted)"
embed.set_author(name=message.name, icon_url=message.avatar_url or discord.Embed.Empty)

View File

@@ -88,4 +88,4 @@ async def export(ctx: CommandContext):
}
f = io.BytesIO(json.dumps(data).encode("utf-8"))
await ctx.client.send_file(ctx.message.channel, f, filename="system.json")
await ctx.message.channel.send(content="Here you go!", file=discord.File(fp=f, filename="system.json"))