From 181fe5eb07223efd976ab792ef1c9aca78461bf0 Mon Sep 17 00:00:00 2001 From: Ren Adachi <49895682+moeyashi@users.noreply.github.com> Date: Sat, 25 May 2024 23:50:32 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=A1=A8=E7=A4=BA=E6=94=B9=E5=96=84=20?= =?UTF-8?q?#132?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ren Adachi <49895682+moeyashi@users.noreply.github.com> --- src/slash-command/rival.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slash-command/rival.js b/src/slash-command/rival.js index ab2087e..8b35ea2 100644 --- a/src/slash-command/rival.js +++ b/src/slash-command/rival.js @@ -44,7 +44,7 @@ export default { ); /** @type {import('discord.js').InteractionReplyOptions} */ const res = { - content: `VS ${userQuery.displayName || userQuery.username}`, + content: `VS ${userQuery.username || userQuery.globalName}`, }; if (tracks.length === 0) { res.content = res.content + '\n\n記録がありません'; @@ -70,7 +70,7 @@ export default { const diffRival = executorMilliseconds - rivalMilliseconds; embeds[embeds.length - 1].fields?.push({ name: track?.trackName || '', - value: `**${diffRival / 1000}秒** (${displayMilliseconds(executorMilliseconds)} VS ${displayMilliseconds(rivalMilliseconds)})`, + value: `**${Math.abs(diffRival) / 1000}秒** (${displayMilliseconds(executorMilliseconds)} VS ${displayMilliseconds(rivalMilliseconds)})`, }); } res.embeds = embeds;