From 22e8237bf1644b1dd83aeeb4909a870f2a53b284 Mon Sep 17 00:00:00 2001 From: PhoenixShay Date: Sun, 28 May 2017 16:54:56 -0400 Subject: [PATCH] Fix Util.js : fetchRecommendedShards() (#1532) * Fix Util.js : fetchRecommendedShards() I'm not sure who thought this was a good idea, but by removing gateway, it broke fetchRecommendedShards() in Util.js as it uses ${Constants.Endpoints.gateway.bot}. * Update Constants.js * Update Constants.js * Update Util.js * Update Constants.js --- src/util/Constants.js | 1 + src/util/Util.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/Constants.js b/src/util/Constants.js index 5e5c2c1ee..fdcc78d7b 100644 --- a/src/util/Constants.js +++ b/src/util/Constants.js @@ -134,6 +134,7 @@ exports.Endpoints = { }; }, invite: code => `https://discord.gg/${code}`, + botGateway: '/gateway/bot', }; diff --git a/src/util/Util.js b/src/util/Util.js index 0cf2e1130..e48d736c8 100644 --- a/src/util/Util.js +++ b/src/util/Util.js @@ -55,7 +55,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(`${ConstantsHttp.host}/api/v${ConstantsHttp.version}${Constants.Endpoints.gateway.bot}`) + snekfetch.get(`${ConstantsHttp.host}/api/v${ConstantsHttp.version}${Constants.Endpoints.botGateway}`) .set('Authorization', `Bot ${token.replace(/^Bot\s*/i, '')}`) .end((err, res) => { if (err) reject(err);