blob: 496f84e100e482e2c1f80e296614725aa44441ea [file] [log] [blame]
PineaFana34d04b2023-01-03 22:05:42 +00001import { ContextMenuCommandBuilder, GuildMember, UserContextMenuCommandInteraction } from "discord.js";
2import { userAbout } from "../../commands/user/about.js";
3
4const command = new ContextMenuCommandBuilder()
5 .setName("User info")
6
7const callback = async (interaction: UserContextMenuCommandInteraction) => {
TheCodedProf94ff6de2023-02-22 17:47:26 -05008 console.log("callback")
PineaFana34d04b2023-01-03 22:05:42 +00009 const guild = interaction.guild!
10 let member = interaction.targetMember
11 if (!member) member = await guild.members.fetch(interaction.targetId)
12 await userAbout(guild, member as GuildMember, interaction)
13}
14
15const check = async (_interaction: UserContextMenuCommandInteraction) => {
TheCodedProf94ff6de2023-02-22 17:47:26 -050016 console.log("check")
PineaFana34d04b2023-01-03 22:05:42 +000017 return true;
18}
19
20export { command, callback, check }