mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-09 07:17:56 +00:00
chore: clean up .net sentry exceptions
This commit is contained in:
parent
ce0983ba16
commit
09ed215e6c
6 changed files with 38 additions and 17 deletions
|
|
@ -58,13 +58,19 @@ public class MessageEdited: IEventHandler<MessageUpdateEvent>
|
|||
|
||||
var channel = await _cache.TryGetChannel(guildId, evt.ChannelId); // todo: is this correct for message update?
|
||||
if (channel == null)
|
||||
throw new Exception("could not find self channel in MessageEdited event");
|
||||
{
|
||||
_logger.Warning("could not find self channel in MessageEdited event");
|
||||
return;
|
||||
}
|
||||
if (!DiscordUtils.IsValidGuildChannel(channel))
|
||||
return;
|
||||
var rootChannel = await _cache.GetRootChannel(guildId, channel.Id);
|
||||
var guild = await _cache.TryGetGuild(channel.GuildId!.Value);
|
||||
if (guild == null)
|
||||
throw new Exception("could not find self guild in MessageEdited event");
|
||||
{
|
||||
_logger.Warning("could not find self guild in MessageEdited event");
|
||||
return;
|
||||
}
|
||||
var lastMessage = (await _lastMessageCache.GetLastMessage(evt.GuildId.HasValue ? evt.GuildId.Value ?? 0 : 0, evt.ChannelId))?.Current;
|
||||
|
||||
// Only react to the last message in the channel
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue