fix: cuz of eslint...

This commit is contained in:
NekoCyan 2022-11-12 20:20:52 +07:00
parent e7452269a1
commit de0881e2ae

View File

@ -1515,8 +1515,9 @@ class Guild extends AnonymousGuild {
// Check permission // Check permission
const selfPerm = this.me.permissions.toArray(); const selfPerm = this.me.permissions.toArray();
const missingPerms = permission.toArray().filter(x => selfPerm.indexOf(x) === -1); const missingPerms = permission.toArray().filter(x => selfPerm.indexOf(x) === -1);
if (missingPerms[0]) if (missingPerms[0]) {
throw new Error('MISSING_PERMISSIONS', missingPerms.join(", ")); throw new Error('MISSING_PERMISSIONS', missingPerms.join(', '));
}
// Add bot // Add bot
return this.client.authorizeURL( return this.client.authorizeURL(
`https://discord.com/api/oauth2/authorize?client_id=${botId}&permissions=${permission.bitfield}&scope=applications.commands%20bot`, `https://discord.com/api/oauth2/authorize?client_id=${botId}&permissions=${permission.bitfield}&scope=applications.commands%20bot`,