Skip to content

Commit

Permalink
🐛 Fix check guild function
Browse files Browse the repository at this point in the history
  • Loading branch information
Androz2091 committed Feb 17, 2021
1 parent 593d5d4 commit dada34f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit dada34f

Please # to comment.