mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Temporary workaround for https://github.com/DSharpPlus/DSharpPlus/issues/565
This commit is contained in:
parent
c1d17c2944
commit
892601110f
4 changed files with 21 additions and 4 deletions
|
|
@ -11,6 +11,7 @@ using Autofac;
|
|||
using DSharpPlus;
|
||||
using DSharpPlus.Entities;
|
||||
using DSharpPlus.EventArgs;
|
||||
using DSharpPlus.Exceptions;
|
||||
|
||||
using NodaTime;
|
||||
|
||||
|
|
@ -122,6 +123,8 @@ namespace PluralKit.Bot
|
|||
{
|
||||
// Make this beforehand so we can access the event ID for logging
|
||||
var sentryEvent = new SentryEvent(exc);
|
||||
if (exc is BadRequestException bre)
|
||||
sentryEvent.SetExtra("errors", MiscUtils.ExtractError(bre));
|
||||
|
||||
_logger.Error(exc, "Exception in bot event handler (Sentry ID: {SentryEventId})", sentryEvent.EventId);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue