diff --git a/PluralKit.Bot/Bot.cs b/PluralKit.Bot/Bot.cs index bde58fe5..2966588f 100644 --- a/PluralKit.Bot/Bot.cs +++ b/PluralKit.Bot/Bot.cs @@ -424,6 +424,12 @@ namespace PluralKit.Bot 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 ?? "", "event.messageEdit", data: new Dictionary() { {"channel", args.Channel.Id.ToString()},