mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 00:12:32 +02:00
Custom hasPermission
This commit is contained in:
@@ -24,7 +24,8 @@ module.exports = class ClearSettingCommand extends Command {
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
return msg.member.hasPermission('ADMINISTRATOR');
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
|
||||
@@ -12,7 +12,8 @@ module.exports = class InviteGuardCommand extends Command {
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
return msg.member.hasPermission('ADMINISTRATOR');
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg) {
|
||||
|
||||
@@ -19,7 +19,8 @@ module.exports = class JoinRoleCommand extends Command {
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
return msg.member.hasPermission('ADMINISTRATOR');
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
|
||||
@@ -19,7 +19,8 @@ module.exports = class MemberLogCommand extends Command {
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
return msg.member.hasPermission('ADMINISTRATOR');
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
|
||||
@@ -34,7 +34,8 @@ module.exports = class MemberMsgCommand extends Command {
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
return msg.member.hasPermission('ADMINISTRATOR');
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
|
||||
@@ -19,7 +19,8 @@ module.exports = class ModChannelCommand extends Command {
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
return msg.member.hasPermission('ADMINISTRATOR');
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
|
||||
@@ -19,7 +19,8 @@ module.exports = class SingleRoleCommand extends Command {
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
return msg.member.hasPermission('ADMINISTRATOR');
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
|
||||
@@ -19,7 +19,8 @@ module.exports = class StaffRoleCommand extends Command {
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
return msg.member.hasPermission('ADMINISTRATOR');
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
|
||||
@@ -19,7 +19,8 @@ module.exports = class StarboardCommand extends Command {
|
||||
}
|
||||
|
||||
hasPermission(msg) {
|
||||
return msg.member.hasPermission('ADMINISTRATOR');
|
||||
if (!msg.member.hasPermission('ADMINISTRATOR')) return 'You do not have the `Administrator` Permission.';
|
||||
else return true;
|
||||
}
|
||||
|
||||
run(msg, args) {
|
||||
|
||||
Reference in New Issue
Block a user