diff options
author | Lulonaut <67191924+Lulonaut@users.noreply.github.com> | 2022-04-19 22:06:38 +0200 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-04-19 20:43:27 -0400 |
commit | d6abde6618c89d4d746a22accda86f20a43de821 (patch) | |
tree | cc521316c4ec3f32412b49ef828c74345d1796bd /src/context-menu-commands/user | |
parent | 3b0bb0da22533bb3d087cf87897ff4263e3ff7de (diff) | |
download | tanzanite-d6abde6618c89d4d746a22accda86f20a43de821.tar.gz tanzanite-d6abde6618c89d4d746a22accda86f20a43de821.tar.bz2 tanzanite-d6abde6618c89d4d746a22accda86f20a43de821.zip |
fix user info context command (#60)
Diffstat (limited to 'src/context-menu-commands/user')
-rw-r--r-- | src/context-menu-commands/user/userInfo.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/context-menu-commands/user/userInfo.ts b/src/context-menu-commands/user/userInfo.ts index d6e8132..475b5bb 100644 --- a/src/context-menu-commands/user/userInfo.ts +++ b/src/context-menu-commands/user/userInfo.ts @@ -1,5 +1,5 @@ import { UserInfoCommand } from '#commands'; -import { type BushGuild, type BushGuildMember, type BushUser } from '#lib'; +import { type BushGuild } from '#lib'; import { ContextMenuCommand } from 'discord-akairo'; import { ApplicationCommandType, type ContextMenuCommandInteraction } from 'discord.js'; @@ -15,9 +15,9 @@ export default class UserInfoContextMenuCommand extends ContextMenuCommand { public override async exec(interaction: ContextMenuCommandInteraction) { await interaction.deferReply({ ephemeral: true }); - const user = (await interaction.user.fetch()) as BushUser; - const member = interaction.member as BushGuildMember; - const guild = interaction.guild as BushGuild; + const user = await client.users.fetch(interaction.targetId); + const guild = interaction.guild as BushGuild + const member = await guild.members.fetch(interaction.targetId); const userEmbed = await UserInfoCommand.makeUserInfoEmbed(user, member, guild); return await interaction.editReply({ embeds: [userEmbed] }); |