mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-24 02:15:10 +02:00
array() -> values() in help
This commit is contained in:
@@ -46,14 +46,14 @@ module.exports = class HelpCommand extends Command {
|
|||||||
.setTitle(!showAll ? `Commands Available in ${msg.guild ? msg.guild.name : 'this DM'}` : 'All Commands')
|
.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.`)
|
.setDescription(`Use ${msg.usage('<command>')} to view detailed information about a specific command.`)
|
||||||
.setColor(0x00AE86);
|
.setColor(0x00AE86);
|
||||||
for (const group of this.client.registry.groups.array()) {
|
for (const group of this.client.registry.groups.values()) {
|
||||||
embed.addField(group.name,
|
embed.addField(group.name,
|
||||||
showAll ?
|
showAll ?
|
||||||
group.commands.map(c => c.name).join(', ') :
|
group.commands.map(c => c.name).join(', ') :
|
||||||
group.commands.filter(c => c.isUsable(msg)).map(c => c.name).join(', ') || 'None Available');
|
group.commands.filter(c => c.isUsable(msg)).map(c => c.name).join(', ') || 'None Available');
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
await msg.author.send({ embed });
|
await msg.direct({ embed });
|
||||||
return msg.say(':mailbox_with_mail: Sent you a DM with information.');
|
return msg.say(':mailbox_with_mail: Sent you a DM with information.');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return msg.say('Failed to send DM. You probably have DMs disabled.');
|
return msg.say('Failed to send DM. You probably have DMs disabled.');
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "xiaobot",
|
"name": "xiaobot",
|
||||||
"version": "19.8.1",
|
"version": "19.8.2",
|
||||||
"description": "A Discord Bot",
|
"description": "A Discord Bot",
|
||||||
"main": "shardingmanager.js",
|
"main": "shardingmanager.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user