mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33: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 => {
|
||||
if (res.ok) return res.json();
|
||||
if (res.status === 401) throw new DiscordError('TOKEN_INVALID');
|
||||
throw res;
|
||||
})
|
||||
.then(data => data.shards * (1000 / guildsPerShard));
|
||||
|
||||
Reference in New Issue
Block a user