feat: slightly more debug logs, enrich message events with extra data

This commit is contained in:
sam 2024-11-26 21:25:10 +01:00
parent c06376dfda
commit 27e77eeaed
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
5 changed files with 79 additions and 5 deletions

View file

@ -42,6 +42,8 @@ public class MessageUpdateResponder(
public async Task<Result> RespondAsync(IMessageUpdate evt, CancellationToken ct = default)
{
using var _ = LogUtils.Enrich(evt);
// Discord only *very* recently changed message update events to have all fields,
// so we convert the event to a MessageCreate to avoid having to unwrap every single field
var msg = ConvertToMessageCreate(evt);