mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix(bot): fix NRE in Maki logclean
This commit is contained in:
parent
2fabdd2bab
commit
e46d706d29
1 changed files with 1 additions and 1 deletions
|
|
@ -239,7 +239,7 @@ public class LoggerCleanService
|
|||
{
|
||||
// Embed, Message Author Name field: "Message Deleted", footer is "Message ID: [id]"
|
||||
var embed = msg.Embeds?.FirstOrDefault();
|
||||
if (embed.Author?.Name == null || embed?.Footer == null || !embed.Author.Name.StartsWith("Message Deleted")) return null;
|
||||
if (embed?.Author?.Name == null || embed?.Footer == null || (!embed?.Author?.Name.StartsWith("Message Deleted") ?? false)) return null;
|
||||
var match = _makiRegex.Match(embed.Footer.Text ?? "");
|
||||
return match.Success ? ulong.Parse(match.Groups[1].Value) : null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue