You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
import { ContextMenuCommandBuilder, GuildMember, UserContextMenuCommandInteraction } from "discord.js";
|
|
|
|
|
import { userAbout } from "../../commands/user/about.js";
|
|
|
|
|
|
|
|
|
|
const command = new ContextMenuCommandBuilder().setName("User info");
|
|
|
|
|
|
|
|
|
|
const callback = async (interaction: UserContextMenuCommandInteraction) => {
|
|
|
|
|
const guild = interaction.guild!;
|
|
|
|
|
let member = interaction.targetMember;
|
|
|
|
|
if (!member) member = await guild.members.fetch(interaction.targetId);
|
|
|
|
|
await userAbout(guild, member as GuildMember, interaction);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const check = async (_interaction: UserContextMenuCommandInteraction) => {
|
|
|
|
|
return true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export { command, callback, check };
|