[英]Discord api /users/@me/guilds rate limit
I'm creating a Discord login feature where a user has to be in a specific guild to being able to log in a dashboard.我正在创建一个 Discord 登录功能,用户必须在特定的公会中才能登录仪表板。 Now I have been hitting the rate limit since 26-10-2022 20:30 and the rate limit is still here at this time.
现在我从 26-10-2022 20:30 开始一直在达到速率限制,此时速率限制仍然存在。
These are the headers being returned from the guilds request:这些是从公会请求返回的标头:
array:22 [▼
"retry-after" => array:1 [▼
0 => "772"
]
"x-ratelimit-reset" => array:1 [▼
0 => "1664228738"
]
"x-ratelimit-reset-after" => array:1 [▼
0 => "1"
]
]
x-ratelimit-reset is an epoch time so i convert it x-ratelimit-reset 是一个纪元时间,所以我将其转换
$epoch = 1664228738;
$dt = new DateTime("@$epoch"); // convert UNIX timestamp to PHP DateTime
echo $dt->format('Y-m-d H:i:s'); // output = 2022-09-26 21:45:38
X-RateLimit-Reset - Epoch time (seconds since 00:00:00 UTC on January 1, 1970) at which the rate limit resets
X-RateLimit-Reset-After - Total time (in seconds) of when the current rate limit bucket will reset. Can have decimals to match previous millisecond ratelimit precision
Is there any way to request access or increase the amount of requests on this endpoint?有什么方法可以请求访问或增加此端点上的请求数量?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.