/[sudobot]/trunk/src/commands/moderation/NoteCommand.ts
ViewVC logotype

Diff of /trunk/src/commands/moderation/NoteCommand.ts

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 86 by rakin, Mon Jul 29 17:28:32 2024 UTC revision 344 by rakin, Mon Jul 29 17:29:40 2024 UTC
# Line 1  Line 1 
1  import { BanOptions, CommandInteraction, Guild, GuildMember, Interaction, Message, User } from 'discord.js';  import { CommandInteraction, GuildMember, Message, User } from 'discord.js';
2  import BaseCommand from '../../utils/structures/BaseCommand';  import BaseCommand from '../../utils/structures/BaseCommand';
3  import DiscordClient from '../../client/Client';  import DiscordClient from '../../client/Client';
4  import CommandOptions from '../../types/CommandOptions';  import CommandOptions from '../../types/CommandOptions';
5  import InteractionOptions from '../../types/InteractionOptions';  import InteractionOptions from '../../types/InteractionOptions';
6  import MessageEmbed from '../../client/MessageEmbed';  import MessageEmbed from '../../client/MessageEmbed';
7  import getUser from '../../utils/getUser';  import getUser from '../../utils/getUser';
 import History from '../../automod/History';  
 import getMember from '../../utils/getMember';  
 import ms from 'ms';  
8  import { fetchEmoji } from '../../utils/Emoji';  import { fetchEmoji } from '../../utils/Emoji';
9    
10  export async function note(user: GuildMember | User, content: string, msg: Message | CommandInteraction) {  export async function note(user: GuildMember | User, content: string, msg: Message | CommandInteraction) {
# Line 18  export async function note(user: GuildMe Line 15  export async function note(user: GuildMe
15          author: msg.member!.user.id,          author: msg.member!.user.id,
16          mod_tag: (msg.member!.user as User).tag,          mod_tag: (msg.member!.user as User).tag,
17          user_id: user.id,          user_id: user.id,
18          guild_id: msg.guild!.id          guild_id: msg.guild!.id,
19            createdAt: new Date(),
20      });      });
21  }  }
22    
# Line 97  export default class NoteCommand extends Line 95  export default class NoteCommand extends
95                  new MessageEmbed()                  new MessageEmbed()
96                  .setDescription(`${(await fetchEmoji('check'))?.toString()} A note has been added for ${user.tag}`)                  .setDescription(`${(await fetchEmoji('check'))?.toString()} A note has been added for ${user.tag}`)
97                  .setFooter({                  .setFooter({
98                      text: `ID: ${n.get().id}`                      text: `ID: ${n.id}`
99                  })                  })
100              ]              ]
101          });          });

Legend:
Removed from v.86  
changed lines
  Added in v.344

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26