mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-13 00:09:08 +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.`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,11 @@ class Util {
|
||||
.replace(/(&)/g, '&')
|
||||
.replace(/(\[i\]|\[\/i\])/g, '*');
|
||||
}
|
||||
|
||||
static placeholder({ size, color }) {
|
||||
if (!size) size = '200x200';
|
||||
return `http://via.placeholder.com/${size}/${color}/${color}`;
|
||||
}
|
||||
static dBots(count, id) {
|
||||
snekfetch
|
||||
.post(`https://bots.discord.pw/api/bots/${id}/stats`)
|
||||
|
||||
Reference in New Issue
Block a user