Skip to content

Commit

Permalink
feat: 表示改善 #132
Browse files Browse the repository at this point in the history
Signed-off-by: Ren Adachi <[email protected]>
  • Loading branch information
moeyashi committed May 25, 2024
1 parent f39296a commit 181fe5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/slash-command/rival.js
Original file line number Diff line number Diff line change
Expand Up @@ -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記録がありません';
Expand All @@ -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;
Expand Down

0 comments on commit 181fe5e

Please sign in to comment.