mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-09 07:17:56 +00:00
fix(bot): silence internal errors from initial handler checks
This commit is contained in:
parent
e44d2afd7e
commit
8d53021863
2 changed files with 20 additions and 9 deletions
|
|
@ -86,12 +86,19 @@ public class MessageCreated: IEventHandler<MessageCreateEvent>
|
|||
}
|
||||
|
||||
// Try each handler until we find one that succeeds
|
||||
// only show exceptions to users if the checks above succeed
|
||||
try
|
||||
{
|
||||
if (await TryHandleCommand(shardId, evt, guild, channel))
|
||||
return;
|
||||
|
||||
if (await TryHandleCommand(shardId, evt, guild, channel))
|
||||
return;
|
||||
|
||||
if (evt.GuildId != null)
|
||||
await TryHandleProxy(evt, guild, channel, rootChannel.Id, botPermissions);
|
||||
if (evt.GuildId != null)
|
||||
await TryHandleProxy(evt, guild, channel, rootChannel.Id, botPermissions);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
await _bot.HandleError(this, evt, _services, exc, true);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task TryHandleLogClean(Channel channel, MessageCreateEvent evt)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue