blob: 7a7575410052b020c29a4eee51cce4232353640f [file] [log] [blame]
PineaFana34d04b2023-01-03 22:05:42 +00001import { ContextMenuCommandBuilder, GuildMember, UserContextMenuCommandInteraction } from "discord.js";
2import { userAbout } from "../../commands/user/about.js";
3
Skyler Greyda16adf2023-03-05 10:22:12 +00004const command = new ContextMenuCommandBuilder().setName("User info");
PineaFana34d04b2023-01-03 22:05:42 +00005
6const callback = async (interaction: UserContextMenuCommandInteraction) => {
Skyler Greyda16adf2023-03-05 10:22:12 +00007 console.log("callback");
8 const guild = interaction.guild!;
9 let member = interaction.targetMember;
10 if (!member) member = await guild.members.fetch(interaction.targetId);
11 await userAbout(guild, member as GuildMember, interaction);
12};
PineaFana34d04b2023-01-03 22:05:42 +000013
14const check = async (_interaction: UserContextMenuCommandInteraction) => {
Skyler Greyda16adf2023-03-05 10:22:12 +000015 console.log("check");
PineaFana34d04b2023-01-03 22:05:42 +000016 return true;
Skyler Greyda16adf2023-03-05 10:22:12 +000017};
PineaFana34d04b2023-01-03 22:05:42 +000018
Skyler Greyda16adf2023-03-05 10:22:12 +000019export { command, callback, check };