mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-22 01:57:54 +02:00
Role Info, Permissions Stuff
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const perms = require('../assets/json/permissions');
|
||||
|
||||
class XiaoCommand extends Command {
|
||||
constructor(client, info) {
|
||||
@@ -25,14 +26,14 @@ class XiaoCommand extends Command {
|
||||
if (this.clientPermissions) {
|
||||
for (const permission of this.clientPermissions) {
|
||||
if (!msg.channel.permissionsFor(this.client.user).has(permission)) {
|
||||
return `This Command requires the \`${permission}\` Permission.`;
|
||||
return `This Command requires the \`${perms[permission]}\` Permission.`;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.userPermissions) {
|
||||
for (const permission of this.userPermissions) {
|
||||
if (!msg.channel.permissionsFor(msg.author).has(permission)) {
|
||||
return `You do not have the \`${permission}\` Permission.`;
|
||||
return `You do not have the \`${perms[permission]}\` Permission.`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user