aboutsummaryrefslogtreecommitdiff
path: root/src/commands/info
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/info')
-rw-r--r--src/commands/info/help.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts
index eac48a6..4999446 100644
--- a/src/commands/info/help.ts
+++ b/src/commands/info/help.ts
@@ -1,7 +1,6 @@
import { BushCommand, BushMessage, BushSlashMessage } from '#lib';
import { MessageActionRow, MessageButton, MessageEmbed } from 'discord.js';
-
-const packageDotJSON = await import('../../../package.json', { assert: { type: 'json' } }).catch(() => null);
+import packageDotJSON from '../../../package.json' assert { type: 'json' };
export default class HelpCommand extends BushCommand {
public constructor() {
@@ -74,7 +73,7 @@ export default class HelpCommand extends BushCommand {
embed.addField(`${categoryNice}`, `${categoryCommands.join(' ')}`);
}
}
- return await message.util.reply({ embeds: [embed], components: [row] });
+ return await message.util.reply({ embeds: [embed], components: row.components.length ? [row] : undefined });
}
const embed = new MessageEmbed()
@@ -113,7 +112,7 @@ export default class HelpCommand extends BushCommand {
if (restrictions.length) embed.addField('ยป Restrictions', restrictions.join('\n'));
}
- return await message.util.reply({ embeds: [embed], components: [row] });
+ return await message.util.reply({ embeds: [embed], components: row.components.length ? [row] : undefined });
}
private addLinks(message: BushMessage | BushSlashMessage) {