mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 20:46:08 +00:00
chore: early conditional on check permissions (#265)
* chore: early conditional * fix: logic Co-authored-by: Marcos Susaña <marcosjgs03@gmail.com> --------- Co-authored-by: Marcos Susaña <marcosjgs03@gmail.com>
This commit is contained in:
parent
24cfd39001
commit
455ed12b0e
@ -503,8 +503,10 @@ export class HandleCommand {
|
||||
}
|
||||
|
||||
checkPermissions(app: PermissionsBitField, bot: bigint) {
|
||||
if (app.has('Administrator')) return;
|
||||
|
||||
const permissions = app.missings(...app.values([bot]));
|
||||
if (!app.has('Administrator') && permissions.length) {
|
||||
if (permissions.length) {
|
||||
return app.keys(permissions);
|
||||
}
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user