Skip to content

Commit

Permalink
Merge pull request #135 from moeyashi/feature/132
Browse files Browse the repository at this point in the history
feat: 表示改善 #132
  • Loading branch information
moeyashi authored May 25, 2024
2 parents 3cb2f93 + 146c8cd commit 36cb578
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 36cb578

Please sign in to comment.