aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands/info/help.ts7
-rw-r--r--src/lib/extensions/discord-akairo/BushClient.ts1
-rw-r--r--src/listeners/client/ready.ts1
3 files changed, 4 insertions, 5 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) {
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts
index 8dd1748..e5ce7be 100644
--- a/src/lib/extensions/discord-akairo/BushClient.ts
+++ b/src/lib/extensions/discord-akairo/BushClient.ts
@@ -356,6 +356,7 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
});
await Promise.all(promises);
this.customReady = true;
+ this.taskHandler.startAll();
return done(null, `intercepted ${arg}`);
});
diff --git a/src/listeners/client/ready.ts b/src/listeners/client/ready.ts
index 1fb5c4a..c550c6b 100644
--- a/src/listeners/client/ready.ts
+++ b/src/listeners/client/ready.ts
@@ -12,7 +12,6 @@ export default class ReadyListener extends BushListener {
// eslint-disable-next-line no-empty-pattern
public override async exec(...[]: BushClientEvents['ready']) {
- client.taskHandler.startAll();
process.emit('ready' as any);
const tag = `<<${client.user?.tag}>>`,