mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Make the bot silently continue if logging fails
This commit is contained in:
parent
4bdc14e161
commit
e22667ce90
1 changed files with 5 additions and 1 deletions
|
|
@ -33,7 +33,11 @@ async def log_message(original_message, hook_message, member, log_channel):
|
|||
message_link = "https://discordapp.com/channels/{}/{}/{}".format(original_message.server.id, original_message.channel.id, hook_message.id)
|
||||
embed.author.url = message_link
|
||||
|
||||
await client.send_message(log_channel, embed=embed)
|
||||
try:
|
||||
await client.send_message(log_channel, embed=embed)
|
||||
except discord.errors.Forbidden:
|
||||
# Ignore logging permission errors, perhaps make it spam a big nasty error instead
|
||||
pass
|
||||
|
||||
async def log_delete(hook_message, member, log_channel):
|
||||
embed = make_log_embed(hook_message, member, channel_name=hook_message.channel.name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue