Various bug fixes
This commit is contained in:
@@ -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)
|
||||
|
||||
|
@@ -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"))
|
||||
|
Reference in New Issue
Block a user