From 9b1336bb7a5abd1c6ae71b75e5b395424ea443f4 Mon Sep 17 00:00:00 2001 From: MotiCAT Date: Tue, 9 Jan 2024 17:28:53 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20User=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/interactions/user.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/interactions/user.ts b/src/interactions/user.ts index 6d6106e..07eb42e 100644 --- a/src/interactions/user.ts +++ b/src/interactions/user.ts @@ -1,8 +1,7 @@ import { ChatInputCommandInteraction, EmbedBuilder, GuildMember } from 'discord.js'; export async function userCommand(interaction: ChatInputCommandInteraction) { - const member = - (interaction.options.getMember('member') as GuildMember | undefined) ?? (interaction.member as GuildMember); + const member = (interaction.options.getMember('user') as GuildMember) ?? (interaction.member as GuildMember); const createdDate = new Date(member.user.createdAt).toLocaleString('ja-JP', { timeZone: 'Asia/Tokyo' }); const nickname = member.nickname ?? 'なし'; if (!member.joinedAt) return;