aboutsummaryrefslogtreecommitdiff
path: root/src/commands/info
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-13 22:51:40 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-13 22:51:40 -0500
commit927a713035272eb00b19462d0431dad033264c52 (patch)
tree5578af47ddd4174c71fff8bfbea5970b1199cad4 /src/commands/info
parentf1ec265e86bdf744d84e5a3a0d48b5efdf23753b (diff)
downloadtanzanite-927a713035272eb00b19462d0431dad033264c52.tar.gz
tanzanite-927a713035272eb00b19462d0431dad033264c52.tar.bz2
tanzanite-927a713035272eb00b19462d0431dad033264c52.zip
major bug fix
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) {