feat(bot): print any rate limit headers received on interactions routes

This commit is contained in:
spiral 2022-11-28 18:59:02 -05:00
parent 580b4dfe7b
commit 3f62f89e18
No known key found for this signature in database
GPG Key ID: 244A11E4B0BCF40E

View File

@ -60,6 +60,9 @@ public class Ratelimiter: IDisposable
if (!headers.HasRatelimitInfo)
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}");
// TODO: properly calculate server time?
if (headers.Global)
{