diff --git a/src/structures/interfaces/Application.js b/src/structures/interfaces/Application.js index 4d3d2c7..659fc1d 100644 --- a/src/structures/interfaces/Application.js +++ b/src/structures/interfaces/Application.js @@ -80,30 +80,30 @@ class Application extends Base { * @param {string} guild_id The id of the guild that you want to invite the bot to * @param {bigint} [permissions] The permissions for the bot in number form (the default is 8 / Administrator) * @param {string} [captcha] The captcha key to add - * @returns nothing :) + * @returns {undefined} nothing :) */ async invite(guild_id, permissions = 8, captcha = null) { - let res = await this.client.api.oauth2.authorize.post({ + await this.client.api.oauth2.authorize.post({ query: { client_id: this.id, - scope: 'bot applications.commands' - }, - data: captcha ? { - captcha_key: captcha, - authorize: true, - guild_id, - permissions, - } : { - authorize: true, - guild_id, - permissions, + scope: 'bot applications.commands', }, + data: captcha + ? { + captcha_key: captcha, + authorize: true, + guild_id, + permissions, + } + : { + authorize: true, + guild_id, + permissions, + }, headers: { - "referer": `https://discord.com/oauth2/authorize?client_id=${this.id}&permissions=${permissions}&scope=bot` - } + referer: `https://discord.com/oauth2/authorize?client_id=${this.id}&permissions=${permissions}&scope=bot`, + }, }); - - return; } /**