feat: more log context

This commit is contained in:
sam 2024-11-27 15:48:30 +01:00
parent 4047df8610
commit 7749c9d9e2
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
21 changed files with 159 additions and 15 deletions

View file

@ -14,6 +14,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.
using Catalogger.Backend.Cache.InMemoryCache;
using Catalogger.Backend.Extensions;
using Remora.Discord.API.Abstractions.Gateway.Events;
using Remora.Discord.API.Abstractions.Objects;
using Remora.Discord.Gateway.Responders;
@ -28,6 +29,8 @@ public class AuditLogResponder(AuditLogCache auditLogCache, ILogger logger)
public Task<Result> RespondAsync(IGuildAuditLogEntryCreate evt, CancellationToken ct = default)
{
using var _ = LogUtils.Enrich(evt);
if (evt.TargetID == null || evt.UserID == null)
return Task.FromResult(Result.Success);