From dada34f22cb73b9fe3de4edf705e73db9f3975e7 Mon Sep 17 00:00:00 2001 From: Androz2091 Date: Wed, 17 Feb 2021 18:10:08 +0100 Subject: [PATCH] :bug: Fix check guild function --- src/api.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/api.js b/src/api.js index cff2933..c3cf7f0 100644 --- a/src/api.js +++ b/src/api.js @@ -56,8 +56,13 @@ export function getToken (clientID, clientSecret, proxyURL) { * @param {string} guildID */ export function checkGuild (clientID, token, proxyURL, guildID) { - const url = getURL(clientID, guildID); - return request(token, proxyURL, url, 'GET'); + return new Promise((resolve, reject) => { + const url = getURL(clientID, guildID); + request(token, proxyURL, url, 'GET').then((value) => { + if (value) resolve(); + else reject(); + }); + }); } export function fetchCommands (clientID, token, proxyURL, guildID) {