fix(Util): throw token invalid for fetching rec. shard amount (#4779)

This commit is contained in:
Souji
2020-09-04 12:51:15 +02:00
committed by GitHub
parent aa25608c52
commit 77b6a7d5bd

View File

@@ -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));