mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Fix errors on eg. incoming link embed update events
This commit is contained in:
parent
e4ebd2a5fe
commit
7e43b75f97
1 changed files with 6 additions and 0 deletions
|
|
@ -424,6 +424,12 @@ namespace PluralKit.Bot
|
||||||
|
|
||||||
public async Task HandleMessageEdited(MessageUpdateEventArgs args)
|
public async Task HandleMessageEdited(MessageUpdateEventArgs args)
|
||||||
{
|
{
|
||||||
|
// Sometimes edit message events arrive for other reasons (eg. an embed gets updated server-side)
|
||||||
|
// If this wasn't a *content change* (ie. there's message contents to read), bail
|
||||||
|
// It'll also sometimes arrive with no *author*, so we'll go ahead and ignore those messages too
|
||||||
|
if (args.Message.Content == null) return;
|
||||||
|
if (args.Author == null) return;
|
||||||
|
|
||||||
_sentryScope.AddBreadcrumb(args.Message.Content ?? "<unknown>", "event.messageEdit", data: new Dictionary<string, string>()
|
_sentryScope.AddBreadcrumb(args.Message.Content ?? "<unknown>", "event.messageEdit", data: new Dictionary<string, string>()
|
||||||
{
|
{
|
||||||
{"channel", args.Channel.Id.ToString()},
|
{"channel", args.Channel.Id.ToString()},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue