From f06fdb38ef6837b197f8f9214dc52d3163c0eb4c Mon Sep 17 00:00:00 2001 From: spiral Date: Mon, 28 Nov 2022 19:25:20 -0500 Subject: [PATCH] fix(bot): i forgot how serilog works --- Myriad/Rest/Ratelimit/Ratelimiter.cs | 5 ++++- PluralKit.Bot/Handlers/InteractionCreated.cs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Myriad/Rest/Ratelimit/Ratelimiter.cs b/Myriad/Rest/Ratelimit/Ratelimiter.cs index f90ee11f..f74e6c58 100644 --- a/Myriad/Rest/Ratelimit/Ratelimiter.cs +++ b/Myriad/Rest/Ratelimit/Ratelimiter.cs @@ -61,7 +61,10 @@ public class Ratelimiter: IDisposable return; if (endpoint.Contains("interactions")) - _logger.Information($"Discord debug: got rate limit headers for interaction endpoint: global? {headers.Global}, limit: {headers.Limit}, remaining: {headers.Remaining}, reset: {headers.Reset?.ToUnixTimeSeconds()}, reset_after: {headers.ResetAfter?.TotalSeconds}, bucket: {headers.Bucket}"); + _logger.Information("Discord debug: got rate limit headers for interaction endpoint: " + + "global? {global}, limit: {limit}, remaining: {remaining}, reset: {reset}, reset_after: {reset_after}, bucket: {bucket}", + headers.Global, headers.Limit, headers.Remaining, headers.Reset?.ToUnixTimeSeconds(), headers.ResetAfter?.TotalSeconds, headers.Bucket + ); // TODO: properly calculate server time? if (headers.Global) diff --git a/PluralKit.Bot/Handlers/InteractionCreated.cs b/PluralKit.Bot/Handlers/InteractionCreated.cs index 1c1f3498..f645159c 100644 --- a/PluralKit.Bot/Handlers/InteractionCreated.cs +++ b/PluralKit.Bot/Handlers/InteractionCreated.cs @@ -24,7 +24,7 @@ public class InteractionCreated: IEventHandler { if (evt.Type == Interaction.InteractionType.MessageComponent) { - _logger.Information($"Discord debug: got interaction with ID {evt.Id} from custom ID {evt.Data?.CustomId}"); + _logger.Information("Discord debug: got interaction with ID {id} from custom ID {custom_id}", evt.Id, evt.Data?.CustomId); var customId = evt.Data?.CustomId; if (customId == null) return;