fix(bot): i forgot how serilog works

This commit is contained in:
spiral 2022-11-28 19:25:20 -05:00
parent 3f62f89e18
commit f06fdb38ef
No known key found for this signature in database
GPG Key ID: 244A11E4B0BCF40E
2 changed files with 5 additions and 2 deletions

View File

@ -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)

View File

@ -24,7 +24,7 @@ public class InteractionCreated: IEventHandler<InteractionCreateEvent>
{
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;