Message and error logging, various bugfixes
This commit is contained in:
@@ -38,13 +38,13 @@ def status(text: str) -> discord.Embed:
|
||||
return embed
|
||||
|
||||
|
||||
def exception_log(message_content, author_name, author_discriminator, server_id, channel_id) -> discord.Embed:
|
||||
def exception_log(message_content, author_name, author_discriminator, author_id, server_id, channel_id) -> discord.Embed:
|
||||
embed = discord.Embed()
|
||||
embed.colour = discord.Colour.dark_red()
|
||||
embed.title = message_content
|
||||
|
||||
embed.set_footer(text="Sender: {}#{} | Server: {} | Channel: {}".format(
|
||||
author_name, author_discriminator,
|
||||
embed.set_footer(text="Sender: {}#{} ({}) | Server: {} | Channel: {}".format(
|
||||
author_name, author_discriminator, author_id,
|
||||
server_id if server_id else "(DMs)",
|
||||
channel_id
|
||||
))
|
||||
@@ -72,7 +72,7 @@ async def system_card(conn, client: discord.Client, system: System) -> discord.E
|
||||
|
||||
account_names = []
|
||||
for account_id in await system.get_linked_account_ids(conn):
|
||||
account = await client.get_user_info(str(account_id))
|
||||
account = await client.get_user_info(account_id)
|
||||
account_names.append("{}#{}".format(account.name, account.discriminator))
|
||||
|
||||
card.add_field(name="Linked accounts", value="\n".join(account_names))
|
||||
|
Reference in New Issue
Block a user