mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 20:13:30 +01:00
fix(Util): throw token invalid for fetching rec. shard amount (#4779)
This commit is contained in:
@@ -244,6 +244,7 @@ class Util {
|
|||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.ok) return res.json();
|
if (res.ok) return res.json();
|
||||||
|
if (res.status === 401) throw new DiscordError('TOKEN_INVALID');
|
||||||
throw res;
|
throw res;
|
||||||
})
|
})
|
||||||
.then(data => data.shards * (1000 / guildsPerShard));
|
.then(data => data.shards * (1000 / guildsPerShard));
|
||||||
|
|||||||
Reference in New Issue
Block a user