aboutsummaryrefslogtreecommitdiff
path: root/src/commands/utilities/highlight-show.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/commands/utilities/highlight-show.ts')
-rw-r--r--src/commands/utilities/highlight-show.ts34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/commands/utilities/highlight-show.ts b/src/commands/utilities/highlight-show.ts
new file mode 100644
index 0000000..ab7c0c5
--- /dev/null
+++ b/src/commands/utilities/highlight-show.ts
@@ -0,0 +1,34 @@
+import { AllowedMentions, BushCommand, Highlight, type BushMessage, type BushSlashMessage } from '#lib';
+import assert from 'assert';
+import { Embed } from 'discord.js';
+import { highlightSubcommands } from './highlight-!';
+
+export default class HighlightShowCommand extends BushCommand {
+ public constructor() {
+ super('highlight-show', {
+ aliases: [],
+ category: 'utilities',
+ description: highlightSubcommands.show,
+ usage: [],
+ examples: [],
+ clientPermissions: [],
+ userPermissions: []
+ });
+ }
+
+ public override async exec(message: BushMessage | BushSlashMessage) {
+ assert(message.inGuild());
+
+ const [highlight] = await Highlight.findOrCreate({
+ where: {
+ guild: message.guild.id,
+ user: message.author.id
+ }
+ });
+
+ return await message.util.reply({
+ embeds: [new Embed().setTitle('Highlight List').setDescription(highlight.words.join('\n')).setColor(util.colors.default)],
+ allowedMentions: AllowedMentions.none()
+ });
+ }
+}