From 927a713035272eb00b19462d0431dad033264c52 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Mon, 13 Dec 2021 22:51:40 -0500 Subject: major bug fix --- src/commands/info/help.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/commands/info') 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) { -- cgit