fix: cuz of eslint...
This commit is contained in:
parent
e7452269a1
commit
de0881e2ae
@ -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`,
|
||||||
|
Loading…
Reference in New Issue
Block a user