Parent Directory
|
Revision Log
feat(utils): add a dedicated class for moderation command embeds
1 | rakin | 187 | import { MessageEmbed, User, MessageEmbedOptions } from 'discord.js'; |
2 | |||
3 | export class ModerationEmbed extends MessageEmbed { | ||
4 | constructor(protected user: User, protected mod: User, options?: MessageEmbedOptions) { | ||
5 | super({ | ||
6 | author: { | ||
7 | name: user.tag, | ||
8 | iconURL: user.displayAvatarURL() | ||
9 | }, | ||
10 | ...options | ||
11 | }); | ||
12 | |||
13 | this.addField('Executor', [ | ||
14 | `Tag: ${mod.tag}`, | ||
15 | `ID: ${mod.id}` | ||
16 | ]); | ||
17 | |||
18 | this.setFooter({ | ||
19 | text: `${user.id}` | ||
20 | }); | ||
21 | |||
22 | this.setTimestamp(); | ||
23 | |||
24 | this.setColor('#007bff'); | ||
25 | } | ||
26 | } |
[email protected] | ViewVC Help |
Powered by ViewVC 1.1.26 |