blob: 3b1a6bd1426e0c94f5174fe29760fb3ac6c45283 [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) => {
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}
13
14const check = async (_interaction: UserContextMenuCommandInteraction) => {
15 return true;
16}
17
18export { command, callback, check }