/[sudobot]/trunk/src/utils/ModerationEmbed.ts
ViewVC logotype

Annotation of /trunk/src/utils/ModerationEmbed.ts

Parent Directory Parent Directory | Revision Log Revision Log


Revision 187 - (hide annotations)
Mon Jul 29 17:28:56 2024 UTC (8 months, 1 week ago) by rakin
File MIME type: application/typescript
File size: 506 byte(s)
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