mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-27 06:37:32 +02:00
Code Improvements
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
const { Command } = require('discord.js-commando');
|
const { Command } = require('discord.js-commando');
|
||||||
const { RichEmbed } = require('discord.js');
|
const { RichEmbed } = require('discord.js');
|
||||||
|
const { stripIndents } = require('common-tags');
|
||||||
|
|
||||||
module.exports = class NitroCommand extends Command {
|
module.exports = class NitroCommand extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
@@ -20,7 +21,10 @@ module.exports = class NitroCommand extends Command {
|
|||||||
.setThumbnail('https://pbs.twimg.com/profile_images/814184180649197568/y2eZcVMq.jpg')
|
.setThumbnail('https://pbs.twimg.com/profile_images/814184180649197568/y2eZcVMq.jpg')
|
||||||
.setColor(0x748BD9)
|
.setColor(0x748BD9)
|
||||||
.setURL('https://discordapp.com/nitro')
|
.setURL('https://discordapp.com/nitro')
|
||||||
.setDescription('This Message can only be viewed by members with Discord Nitro.\n[More Information](https://discordapp.com/nitro)');
|
.setDescription(stripIndents`
|
||||||
|
This Message can only be viewed by members with Discord Nitro.
|
||||||
|
[More Information](https://discordapp.com/nitro)
|
||||||
|
`);
|
||||||
return msg.embed(embed);
|
return msg.embed(embed);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -54,7 +54,9 @@ module.exports = class HelpCommand extends Command {
|
|||||||
.setColor(0x00AE86);
|
.setColor(0x00AE86);
|
||||||
for (const group of this.client.registry.groups.array()) {
|
for (const group of this.client.registry.groups.array()) {
|
||||||
embed.addField(group.name,
|
embed.addField(group.name,
|
||||||
!showAll ? group.commands.filter(c => c.isUsable(msg)).map(c => `\`${c.name}\``).join(', ') || 'None Available' : group.commands.map(c => `\`${c.name}\``).join(', '));
|
!showAll ?
|
||||||
|
group.commands.filter(c => c.isUsable(msg)).map(c => `\`${c.name}\``).join(', ') || 'None Available' :
|
||||||
|
group.commands.map(c => `\`${c.name}\``).join(', '));
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await msg.author.send({embed});
|
await msg.author.send({embed});
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "17.2.8",
|
"version": "17.2.9",
|
||||||
"description": "A Discord Bot",
|
"description": "A Discord Bot",
|
||||||
"main": "shardingmanager.js",
|
"main": "shardingmanager.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user