aboutsummaryrefslogtreecommitdiff
path: root/src/commands/info/help.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-25 23:47:40 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-25 23:47:40 -0500
commit840cca672d681c36f980a06fb79a4e2c01bd69ac (patch)
tree82c40a7fe3e1a2bc6367fed6e3d26b6c7dceb256 /src/commands/info/help.ts
parent6ca99336a416389dd2b0b8c4c6a7b2ef87bc9fef (diff)
downloadtanzanite-840cca672d681c36f980a06fb79a4e2c01bd69ac.tar.gz
tanzanite-840cca672d681c36f980a06fb79a4e2c01bd69ac.tar.bz2
tanzanite-840cca672d681c36f980a06fb79a4e2c01bd69ac.zip
I love breaking changes!!!!
Diffstat (limited to 'src/commands/info/help.ts')
-rw-r--r--src/commands/info/help.ts22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts
index c77b5d2..67f99d1 100644
--- a/src/commands/info/help.ts
+++ b/src/commands/info/help.ts
@@ -6,7 +6,7 @@ import {
AutocompleteInteraction,
ButtonComponent,
ButtonStyle,
- MessageEmbed,
+ Embed,
Permissions
} from 'discord.js';
import Fuse from 'fuse.js';
@@ -68,7 +68,7 @@ export default class HelpCommand extends BushCommand {
: null;
if (!isOwner) args.showHidden = false;
if (!command || command.pseudo) {
- const embed = new MessageEmbed().setColor(util.colors.default).setTimestamp();
+ const embed = new Embed().setColor(util.colors.default).setTimestamp();
embed.setFooter({ text: `For more information about a command use ${prefix}help <command>` });
for (const [, category] of this.handler.categories) {
const categoryFilter = category.filter((command) => {
@@ -84,23 +84,29 @@ export default class HelpCommand extends BushCommand {
.replace(/'(S)/g, (letter) => letter.toLowerCase());
const categoryCommands = categoryFilter.filter((cmd) => cmd.aliases.length > 0).map((cmd) => `\`${cmd.aliases[0]}\``);
if (categoryCommands.length > 0) {
- embed.addField(`${categoryNice}`, `${categoryCommands.join(' ')}`);
+ embed.addField({ name: `${categoryNice}`, value: `${categoryCommands.join(' ')}` });
}
}
return await message.util.reply({ embeds: [embed], components: row.components.length ? [row] : undefined });
}
- const embed = new MessageEmbed()
+ const embed = new Embed()
.setColor(util.colors.default)
.setTitle(`${command.id} Command`)
.setDescription(`${command.description ?? '*This command does not have a description.*'}`);
if (command.usage?.length) {
- embed.addField(`» Usage${command.usage.length > 1 ? 's' : ''}`, command.usage.map((u) => `\`${u}\``).join('\n'));
+ embed.addField({
+ name: `» Usage${command.usage.length > 1 ? 's' : ''}`,
+ value: command.usage.map((u) => `\`${u}\``).join('\n')
+ });
}
if (command.examples?.length) {
- embed.addField(`» Example${command.examples.length > 1 ? 's' : ''}`, command.examples.map((u) => `\`${u}\``).join('\n'));
+ embed.addField({
+ name: `» Example${command.examples.length > 1 ? 's' : ''}`,
+ value: command.examples.map((u) => `\`${u}\``).join('\n')
+ });
}
- if (command.aliases?.length > 1) embed.addField('» Aliases', `\`${command.aliases.join('` `')}\``);
+ if (command.aliases?.length > 1) embed.addField({ name: '» Aliases', value: `\`${command.aliases.join('` `')}\`` });
if (
command.ownerOnly ||
command.superUserOnly ||
@@ -123,7 +129,7 @@ export default class HelpCommand extends BushCommand {
.map((g) => util.format.inlineCode(client.guilds.cache.find((g1) => g1.id === g)?.name ?? 'Unknown'))
.join(' ')}`
);
- if (restrictions.length) embed.addField('» Restrictions', restrictions.join('\n'));
+ if (restrictions.length) embed.addField({ name: '» Restrictions', value: restrictions.join('\n') });
}
const params = { embeds: [embed], components: row.components.length ? [row] : undefined };