blob: b9f414fc83feff47b95f6c20761bb4bbc2af8563 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
import { AllowedMentions, BushCommand, Highlight, type BushMessage, type BushSlashMessage } from '#lib';
import assert from 'assert';
import { Embed } from 'discord.js';
import { highlightSubcommands } from './highlight-!.js';
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()
});
}
}
|