Fixed User Context Menus
diff --git a/src/context/users/userinfo.ts b/src/context/users/userinfo.ts
index 9c7433f..b215685 100644
--- a/src/context/users/userinfo.ts
+++ b/src/context/users/userinfo.ts
@@ -4,10 +4,13 @@
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);
+ try {
+ console.log("getting user info")
+ const guild = interaction.guild!;
+ let member = interaction.targetMember as GuildMember | null;
+ if (!member) member = await guild.members.fetch(interaction.targetId);
+ await userAbout(guild, member as GuildMember, interaction);
+ } catch (e) { console.log(e) }
};
const check = async (_interaction: UserContextMenuCommandInteraction) => {