Skip to content
This repository was archived by the owner on Feb 18, 2023. It is now read-only.

Commit 500677c

Browse files
committed
X-RateLimit-Reset-After is in seconds rather than milliseconds
1 parent a431764 commit 500677c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Discord/RegisterClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ private function request(string $method, string $endpoint, ?array $content = nul
296296
switch ($e->getResponse()->getStatusCode()) {
297297
case 429:
298298
$resetAfter = (float) $e->getResponse()->getheaderLine('X-RateLimit-Reset-After');
299-
usleep($resetAfter * 1000);
299+
usleep($resetAfter * 1000000);
300300
return $this->request($method, $endpoint, $content);
301301
default:
302302
throw $e;

0 commit comments

Comments
 (0)