Teensy cleanup

This commit is contained in:
Schuyler Cebulskie
2016-10-13 23:32:52 -04:00
parent 853a3dfa04
commit aad06c1116
3 changed files with 4 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ const botGateway = require('./Constants').Endpoints.botGateway;
*/
module.exports = function getRecommendedShards(token) {
return new Promise((resolve, reject) => {
if (!token) reject(new Error('A token must be provided.'));
if (!token) throw new Error('A token must be provided.');
superagent.get(botGateway)
.set('Authorization', `Bot ${token.replace('Bot ', '')}`)
.end((err, res) => {