mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Add more aggressive permission error notification.
This commit is contained in:
parent
e382d05395
commit
e1e4e68203
1 changed files with 10 additions and 1 deletions
|
|
@ -177,7 +177,16 @@ async def try_proxy_message(conn, message: discord.Message, logger: ChannelLogge
|
|||
try:
|
||||
await send_proxy_message(conn, message, system, member, inner_message, logger, bot_user)
|
||||
except ProxyError as e:
|
||||
await message.channel.send("\u274c {}".format(str(e)))
|
||||
# First, try to send the error in the channel it was triggered in
|
||||
# Failing that, send the error in a DM.
|
||||
# Failing *that*... give up, I guess.
|
||||
try:
|
||||
await message.channel.send("\u274c {}".format(str(e)))
|
||||
except discord.Forbidden:
|
||||
try:
|
||||
await message.author.send("\u274c {}".format(str(e)))
|
||||
except discord.Forbidden:
|
||||
pass
|
||||
|
||||
return True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue