Code Improvements

This commit is contained in:
Daniel Odendahl Jr
2017-05-03 13:47:55 +00:00
parent ff18a3f227
commit 54862d1908
3 changed files with 9 additions and 3 deletions
+5 -1
View File
@@ -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);
}
};
+3 -1
View File
@@ -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
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "17.2.8",
"version": "17.2.9",
"description": "A Discord Bot",
"main": "shardingmanager.js",
"scripts": {