array() -> values() in help

This commit is contained in:
Daniel Odendahl Jr
2017-05-18 20:36:33 +00:00
parent 8706a7e8a7
commit ce17a7cd7d
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -46,14 +46,14 @@ module.exports = class HelpCommand extends Command {
.setTitle(!showAll ? `Commands Available in ${msg.guild ? msg.guild.name : 'this DM'}` : 'All Commands')
.setDescription(`Use ${msg.usage('<command>')} to view detailed information about a specific command.`)
.setColor(0x00AE86);
for (const group of this.client.registry.groups.array()) {
for (const group of this.client.registry.groups.values()) {
embed.addField(group.name,
showAll ?
group.commands.map(c => c.name).join(', ') :
group.commands.filter(c => c.isUsable(msg)).map(c => c.name).join(', ') || 'None Available');
}
try {
await msg.author.send({ embed });
await msg.direct({ embed });
return msg.say(':mailbox_with_mail: Sent you a DM with information.');
} catch (err) {
return msg.say('Failed to send DM. You probably have DMs disabled.');
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiaobot",
"version": "19.8.1",
"version": "19.8.2",
"description": "A Discord Bot",
"main": "shardingmanager.js",
"scripts": {