From 11848bc19f5deb51ad44a30b37f2feb9932c1951 Mon Sep 17 00:00:00 2001 From: acw0 Date: Fri, 19 Jun 2020 13:00:04 -0400 Subject: [PATCH] Add support for Auttaja webhook message logs --- PluralKit.Bot/Services/LoggerCleanService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PluralKit.Bot/Services/LoggerCleanService.cs b/PluralKit.Bot/Services/LoggerCleanService.cs index c24ab656..7ec2a564 100644 --- a/PluralKit.Bot/Services/LoggerCleanService.cs +++ b/PluralKit.Bot/Services/LoggerCleanService.cs @@ -41,7 +41,7 @@ namespace PluralKit.Bot new LoggerBot("Logger#6278", 327424261180620801, ExtractLoggerB), new LoggerBot("Dyno", 155149108183695360, ExtractDyno, webhookName: "Dyno"), - new LoggerBot("Auttaja", 242730576195354624, ExtractAuttaja), + new LoggerBot("Auttaja", 242730576195354624, ExtractAuttaja, webhookName: "Auttaja"), new LoggerBot("GenericBot", 295329346590343168, ExtractGenericBot), new LoggerBot("blargbot", 134133271750639616, ExtractBlargBot), new LoggerBot("Mantaro", 213466096718708737, ExtractMantaro), @@ -137,7 +137,7 @@ namespace PluralKit.Bot // Auttaja has an optional "compact mode" that logs without embeds // That one puts the ID in the message content, non-compact puts it in the embed description. // Regex also checks that this is a deletion. - var stringWithId = msg.Content ?? msg.Embeds.FirstOrDefault()?.Description; + var stringWithId = msg.Embeds.FirstOrDefault()?.Description ?? msg.Content; if (stringWithId == null) return null; var match = _auttajaRegex.Match(stringWithId);