blob: 958274f6c38a6bbe5d01039522450b98ee675a0d [file] [log] [blame]
TheCodedProfc016f9f2023-04-23 16:01:38 -04001import { ContextMenuCommandBuilder, GuildMember, PermissionFlagsBits, UserContextMenuCommandInteraction } from "discord.js";
2import { noteMenu } from "../../commands/mod/about.js";
3
4const command = new ContextMenuCommandBuilder().setName("Flag User").setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages);
5
6const callback = async (interaction: UserContextMenuCommandInteraction) => {
7 const guild = interaction.guild!;
8 let member = interaction.targetMember as GuildMember | null;
9 if (!member) member = await guild.members.fetch(interaction.targetId);
10 await noteMenu(member, interaction);
11};
12
13const check = async (_interaction: UserContextMenuCommandInteraction) => {
14 return true;
15};
16
17export { command, callback, check };