mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Code Improvements
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const { Command } = require('discord.js-commando');
|
||||
const { RichEmbed } = require('discord.js');
|
||||
const { stripIndents } = require('common-tags');
|
||||
|
||||
module.exports = class NitroCommand extends Command {
|
||||
constructor(client) {
|
||||
@@ -20,7 +21,10 @@ module.exports = class NitroCommand extends Command {
|
||||
.setThumbnail('https://pbs.twimg.com/profile_images/814184180649197568/y2eZcVMq.jpg')
|
||||
.setColor(0x748BD9)
|
||||
.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);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -54,7 +54,9 @@ module.exports = class HelpCommand extends Command {
|
||||
.setColor(0x00AE86);
|
||||
for (const group of this.client.registry.groups.array()) {
|
||||
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 {
|
||||
await msg.author.send({embed});
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiaobot",
|
||||
"version": "17.2.8",
|
||||
"version": "17.2.9",
|
||||
"description": "A Discord Bot",
|
||||
"main": "shardingmanager.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user