mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
feat(bot): print any rate limit headers received on interactions routes
This commit is contained in:
parent
580b4dfe7b
commit
3f62f89e18
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue