mirror of
https://github.com/danbulant/discord.js
synced 2026-05-30 12:51:55 +00:00
fix(Util): throw token invalid for fetching rec. shard amount (#4779)
This commit is contained in:
parent
aa25608c52
commit
77b6a7d5bd
1 changed files with 1 additions and 0 deletions
|
|
@ -244,6 +244,7 @@ class Util {
|
|||
})
|
||||
.then(res => {
|
||||
if (res.ok) return res.json();
|
||||
if (res.status === 401) throw new DiscordError('TOKEN_INVALID');
|
||||
throw res;
|
||||
})
|
||||
.then(data => data.shards * (1000 / guildsPerShard));
|
||||
|
|
|
|||
Loading…
Reference in a new issue