mirror of
https://github.com/danbulant/discord.js
synced 2026-05-24 20:42:27 +00:00
Fix fetchRecommendedShards
This commit is contained in:
parent
6910585f69
commit
047cd2da5c
1 changed files with 1 additions and 1 deletions
|
|
@ -54,7 +54,7 @@ class Util {
|
|||
static fetchRecommendedShards(token, guildsPerShard = 1000) {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!token) throw new Error('A token must be provided.');
|
||||
snekfetch.get(Constants.Endpoints.gateway.bot)
|
||||
snekfetch.get(`${Constants.DefaultOptions.http.host}/api/v${Constants.DefaultOptions.http.version}${Constants.Endpoints.gateway.bot}`)
|
||||
.set('Authorization', `Bot ${token.replace(/^Bot\s*/i, '')}`)
|
||||
.end((err, res) => {
|
||||
if (err) reject(err);
|
||||
|
|
|
|||
Loading…
Reference in a new issue