mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-16 00:12:32 +02:00
Bug-Fixes
This commit is contained in:
@@ -2,7 +2,6 @@ const Command = require('../../structures/Command');
|
|||||||
const { MessageEmbed } = require('discord.js');
|
const { MessageEmbed } = require('discord.js');
|
||||||
const moment = require('moment');
|
const moment = require('moment');
|
||||||
const perms = require('../../assets/json/permissions');
|
const perms = require('../../assets/json/permissions');
|
||||||
const { placeholder } = require('../../structures/Util');
|
|
||||||
|
|
||||||
module.exports = class RoleInfoCommand extends Command {
|
module.exports = class RoleInfoCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -28,23 +27,20 @@ module.exports = class RoleInfoCommand extends Command {
|
|||||||
const { role } = args;
|
const { role } = args;
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
.setColor(role.hexColor)
|
.setColor(role.hexColor)
|
||||||
.setThumbnail(placeholder({ color: role.hexColor.replace('#', '') }))
|
|
||||||
.addField('❯ Name',
|
.addField('❯ Name',
|
||||||
role.name, true)
|
role.name, true)
|
||||||
.addField('❯ ID',
|
.addField('❯ ID',
|
||||||
role.id, true)
|
role.id, true)
|
||||||
.addField('❯ Creation Date',
|
|
||||||
moment(role.createdAt).format('MMMM Do YYYY'), true)
|
|
||||||
.addField('❯ Color',
|
.addField('❯ Color',
|
||||||
role.hexColor.toUpperCase(), true)
|
role.hexColor.toUpperCase(), true)
|
||||||
|
.addField('❯ Creation Date',
|
||||||
|
moment(role.createdAt).format('MMMM Do YYYY'), true)
|
||||||
.addField('❯ Hoisted',
|
.addField('❯ Hoisted',
|
||||||
role.hoist ? 'Yes' : 'No', true)
|
role.hoist ? 'Yes' : 'No', true)
|
||||||
.addField('❯ Mentionable',
|
.addField('❯ Mentionable',
|
||||||
role.mentionable ? 'Yes' : 'No', true)
|
role.mentionable ? 'Yes' : 'No', true)
|
||||||
.addField('❯ Position',
|
|
||||||
msg.guild.roles.size - role.calculatedPosition, true)
|
|
||||||
.addField('❯ Permissions',
|
.addField('❯ Permissions',
|
||||||
Object.keys(role.serialize()).filter((perm) => role.serialize()[perm]).map((perm) => perms[perm]));
|
Object.keys(perms).filter((perm) => role.serialize()[perm]).map((perm) => perms[perm]).join(', '));
|
||||||
return msg.embed(embed);
|
return msg.embed(embed);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -12,11 +12,6 @@ class Util {
|
|||||||
.replace(/(\[i\]|\[\/i\])/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) {
|
static dBots(count, id) {
|
||||||
snekfetch
|
snekfetch
|
||||||
.post(`https://bots.discord.pw/api/bots/${id}/stats`)
|
.post(`https://bots.discord.pw/api/bots/${id}/stats`)
|
||||||
|
|||||||
Reference in New Issue
Block a user