Skip to content

Commit

Permalink
feat: vid info format
Browse files Browse the repository at this point in the history
  • Loading branch information
Sv443 committed Jan 1, 2025
1 parent 9bbdec0 commit 9ea11a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/assets/translations/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
"confirmationTimeoutNotice": "Confirmation not received within ${sec}s, cancelling.",
"commandOnlyUsableInServers": "This command can only be used in a server",
"enabled": "Enabled",
"disabled": "Disabled"
"disabled": "Disabled",
"listSeparator": ", ",
"listSeparatorLast": " and "
},
"commands": {
"config": {
Expand Down
8 changes: 5 additions & 3 deletions src/commands/VideoInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,9 @@ export class VideoInfoCmd extends SlashCommand {

// TODO: translate
if(actionType === "poi")
timestampList += `${sponsorBlockCategoryColorEmojiMap[category]} [${secsToYtTime(segment[0])}](${startUrl}) (${sponsorBlockCategoryMap[category]})\n`;
timestampList += `${sponsorBlockCategoryColorEmojiMap[category]} [\`${secsToYtTime(segment[0])}\`](${startUrl}) ${sponsorBlockCategoryMap[category]}\n`;
else
timestampList += `${sponsorBlockCategoryColorEmojiMap[category]} [${secsToYtTime(segment[0])}](${startUrl})-[${secsToYtTime(segment[1])}](${endUrl}) (${sponsorBlockCategoryMap[category]})\n`;
timestampList += `${sponsorBlockCategoryColorEmojiMap[category]} [\`${secsToYtTime(segment[0])}\`](${startUrl})-[\`${secsToYtTime(segment[1])}\`](${endUrl}) ${sponsorBlockCategoryMap[category]}\n`;
}

embed.addFields({
Expand All @@ -309,7 +309,9 @@ export class VideoInfoCmd extends SlashCommand {
return null;

// TODO: translate
embed.setFooter({ text: `Powered by ${joinArrayReadable(poweredByStr)}` });
embed.setFooter({
text: `Powered by ${joinArrayReadable(poweredByStr, tr.forLang(locale, "general.listSeparator"), tr.forLang(locale, "general.listSeparatorLast"))}`,
});

return embed;
}
Expand Down

0 comments on commit 9ea11a1

Please # to comment.