diff --git a/i18n/en.json b/i18n/en.json index 8f71c818a..4dbc04340 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -75,7 +75,7 @@ "begin": { "ignored": { "noTeam": { - "description": "Create a team using `{{join}} [team name]` before you can start the game." + "description": "Create a team using {{join}} team_name:[team name] before you can start the game." }, "title": "Begin Ignored" } @@ -357,7 +357,7 @@ "interaction": { "failure": { "notHidden": { - "description": "`/guess` can only be used during `/play hidden`.", + "description": "{{guessCommand}} can only be used during {{playHiddenCommand}}.", "title": "Guess Ignored" } }, @@ -385,7 +385,7 @@ }, "help": { "command": "command", - "description": "Type {{play}} in chat and the bot will play a random k-pop song in VC. The goal of this game is to be the first person to guess the song name in chat.\nSee your current game options with {{options}}. Use {{help}} `[{{command}}]` to get more details ", + "description": "Type {{play}} in chat and the bot will play a random k-pop song in VC. The goal of this game is to be the first person to guess the song name in chat.\nSee your current game options with {{options}}. Use {{help}} action:`[{{command}}]` to get more details ", "examples": "Examples", "failure": { "noDocs": "Sorry, there is no documentation on {{action}}." @@ -801,7 +801,7 @@ "listeningSessionNotAvailable": "Some options are not available during a listening session", "notSet": "Not set", "overview": "Now playing the top {{limit}} out of {{totalSongs}} available songs from the following options:", - "perCommandHelp": "Looking for information on how to use a command? Check out \"{{helpCommand}} [command]\" to learn more.", + "perCommandHelp": "Looking for information on how to use a command? Check out {{helpCommand}} action:[command] to learn more.", "premiumOptionsNonPremiumGame": "Note: active game is not premium", "preset": "Preset", "reset": "{{presetOrOption}} Reset", @@ -845,7 +845,7 @@ "overrideTeams": { "description": "If you meant to start a {{oldGameType}} game, {{end}} this game, call {{playOldGameType}}, {{gameSpecificInstructions}}, and then call {{begin}}.", "teams": { - "join": "`{{join}} [team name]` a team" + "join": "{{join}} team_name:[team name] a team" }, "title": "Ignoring {{playOldGameType}}" } @@ -925,12 +925,12 @@ "title": "Preset Deleted" }, "exported": { - "description": "Import {{presetName}} as a new preset in other servers using:\n`{{presetImport}} {{presetUUID}} [preset_name]`\n\nAlternatively, load the preset's options directly using:\n`{{presetLoad}} {{presetUUID}}`", + "description": "Import {{presetName}} as a new preset in other servers using:\n{{presetImport}} `exported_preset:{{presetUUID}} new_preset_name:[preset_name]`\n\nAlternatively, load the preset's options directly using:\n{{presetLoad}} `preset_name:{{presetUUID}}`", "title": "Preset Exported" }, "failure": { "alreadyExists": { - "description": "Preset {{presetNameFormatted}} already exists. You can delete the old one with `{{presetDelete}} {{presetName}}`.", + "description": "Preset {{presetNameFormatted}} already exists. You can delete the old one with {{presetDelete}} `preset_name:{{presetName}}`.", "title": "Preset Already Exists" }, "illegalPrefix": { @@ -942,7 +942,7 @@ "title": "Preset Name Too Long" }, "missingIdentifier": { - "description": "You must specify a preset identifier. Use `{{presetExport}} [preset_name]` to retrieve a preset's identifier.", + "description": "You must specify a preset identifier. Use {{presetExport}} `preset_name:[preset_name]` to retrieve a preset's identifier.", "title": "Preset Identifier Missing" }, "missingName": { @@ -979,7 +979,7 @@ } }, "imported": { - "description": "Load the newly imported preset using `{{presetLoad}} {{presetName}}`.", + "description": "Load the newly imported preset using {{presetLoad}} `preset_name:{{presetName}}`.", "title": "Preset Imported" }, "interaction": { @@ -1302,7 +1302,7 @@ "description": "Choose whether to automatically include a group's subunits, when using {{groups}}.", "example": { "exclude": "Do not include subunits", - "include": "Automatically include subunits. For example, `{{groupCommand}} {{parentGroup}}` would include songs by {{parentGroup}}, {{subunitOne}}, {{subunitTwo}}, etc.", + "include": "Automatically include subunits. For example, {{groupCommand}} group_1:{{parentGroup}} would include songs by {{parentGroup}}, {{subunitOne}}, {{subunitTwo}}, etc.", "reset": "Reset to the default option of {{defaultSubunit}}" }, "name": "subunits" @@ -1526,7 +1526,7 @@ "notInEnum": "Expected one of the following valid {{argument}} values: ({{validValues}})." }, "numArguments": { - "incorrect": "Incorrect number of arguments. See `{{help}} {{command}}` for usage." + "incorrect": "Incorrect number of arguments. See {{help}} action:{{command}} for usage." }, "number": { "max": "Expected value less than or equal to {{max}} for {{argument}}", @@ -1635,7 +1635,7 @@ "notHidden": "You can't do that during a hidden game.", "notListeningSession": "You can't do that while in a listening session.", "notPremium": "You need KMQ Premium to use this command (see {{premium}}).", - "notSpotify": "You can't change that option when playing from Spotify. Use `/spotify reset` before changing this option.", + "notSpotify": "You can't change that option when playing from Spotify. Use {{spotifyResetCommand}} before changing this option.", "premiumOrDebugServer": "This command only works in the official KMQ server or for KMQ Premium members (see {{premium}}).", "title": "Wait..." }, diff --git a/i18n/es-ES.json b/i18n/es-ES.json index 962b7afb0..11d598970 100644 --- a/i18n/es-ES.json +++ b/i18n/es-ES.json @@ -75,7 +75,7 @@ "begin": { "ignored": { "noTeam": { - "description": "Crea un equipo usando `{{join}} [nombre del equipo]` antes de poder comenzar el juego." + "description": "Crea un equipo usando {{join}} team_name:[nombre del equipo] antes de poder comenzar el juego." }, "title": "Ignorado" } @@ -357,7 +357,7 @@ "interaction": { "failure": { "notHidden": { - "description": "`/guess` solo puede ser usado durante `/play hidden`.", + "description": "{{guessCommand}} solo puede ser usado durante {{playHiddenCommand}}.", "title": "Respuesta ignorada" } }, @@ -801,7 +801,7 @@ "listeningSessionNotAvailable": "Algunas opciones no están disponibles durante una sesión de escucha", "notSet": "No establecido", "overview": "Reproduciendo las mejores {{limit}} de {{totalSongs}} canciones disponibles de las siguientes opciones:", - "perCommandHelp": "¿Buscas información sobre cómo usar un comando? Echa un vistazo a \"{{helpCommand}} [comando]\" para obtener más información.", + "perCommandHelp": "¿Buscas información sobre cómo usar un comando? Echa un vistazo a {{helpCommand}} action:[comando] para obtener más información.", "premiumOptionsNonPremiumGame": "Nota: el juego activo no es premium", "preset": "Preestablecido", "reset": "{{presetOrOption}} Restablecer", @@ -845,7 +845,7 @@ "overrideTeams": { "description": "Si quisiste iniciar un juego de {{oldGameType}}, {{end}} este juego, llama a {{playOldGameType}}, {{gameSpecificInstructions}}, y luego llama a {{begin}}.", "teams": { - "join": "`{{join}} [nombre del equipo]` un equipo" + "join": "{{join}} team_name:[nombre del equipo] un equipo" }, "title": "Ignorando {{playOldGameType}}" } @@ -925,12 +925,12 @@ "title": "Preestablecido Eliminado" }, "exported": { - "description": "Importa {{presetName}} como un nuevo preestablecido en otros servidores usando:\n`{{presetImport}} {{presetUUID}} [nombre_preset]`\n\nAlternativamente, carga las opciones del preestablecido directamente usando:\n`{{presetLoad}} {{presetUUID}}`", + "description": "Importa {{presetName}} como un nuevo preestablecido en otros servidores usando:\n{{presetImport}} `exported_preset:{{presetUUID}} new_preset_name:[nombre_preset]`\n\nAlternativamente, carga las opciones del preestablecido directamente usando:\n{{presetLoad}} `preset_name:{{presetUUID}}`", "title": "Preestablecido Exportado" }, "failure": { "alreadyExists": { - "description": "El preestablecido {{presetNameFormatted}} ya existe. Puedes eliminar el antiguo con `{{presetDelete}} {{presetName}}`.", + "description": "El preestablecido {{presetNameFormatted}} ya existe. Puedes eliminar el antiguo con {{presetDelete}} `preset_name:{{presetName}}`.", "title": "Preestablecido Ya Existe" }, "illegalPrefix": { @@ -942,7 +942,7 @@ "title": "Nombre de preestablecido demasiado largo" }, "missingIdentifier": { - "description": "Debe especificar un identificador de preestablecido. Use `{{presetExport}} [nombre_preset]` para obtener el identificador de un preestablecido.", + "description": "Debe especificar un identificador de preestablecido. Use {{presetExport}} `preset_name:[nombre_preset]` para obtener el identificador de un preestablecido.", "title": "Falta el identificador de preestablecido" }, "missingName": { @@ -979,7 +979,7 @@ } }, "imported": { - "description": "Carga el preestablecido recién importado usando `{{presetLoad}} {{presetName}}`.", + "description": "Carga el preestablecido recién importado usando {{presetLoad}} `preset_name:{{presetName}}`.", "title": "Preestablecido Importado" }, "interaction": { @@ -1302,7 +1302,7 @@ "description": "Elige si incluir automáticamente las subunidades de un grupo al usar {{groups}}.", "example": { "exclude": "No incluir subunidades", - "include": "Incluir automáticamente subunidades. Por ejemplo, `{{groupCommand}} {{parentGroup}}` incluiría canciones de {{parentGroup}}, {{subunitOne}}, {{subunitTwo}}, etc.", + "include": "Incluir automáticamente subunidades. Por ejemplo, {{groupCommand}} group_1:{{parentGroup}} incluiría canciones de {{parentGroup}}, {{subunitOne}}, {{subunitTwo}}, etc.", "reset": "Restablecer a la opción predeterminada de {{defaultSubunit}}" }, "name": "subunidades" @@ -1526,7 +1526,7 @@ "notInEnum": "Se esperaba uno de los siguientes valores válidos para {{argument}}: ({{validValues}})." }, "numArguments": { - "incorrect": "Número incorrecto de argumentos. Consulta `{{help}} {{command}}` para ver el uso." + "incorrect": "Número incorrecto de argumentos. Consulta {{help}} action:{{command}} para ver el uso." }, "number": { "max": "Se esperaba un valor menor o igual a {{max}} para {{argument}}", @@ -1635,7 +1635,7 @@ "notHidden": "No puedes hacer eso durante un juego oculto.", "notListeningSession": "No puedes hacer eso mientras estás en una sesión de escucha.", "notPremium": "Necesitas KMQ Premium para usar este comando (ver {{premium}}).", - "notSpotify": "No puedes cambiar esa opción cuando estás reproduciendo desde Spotify. Usa `/spotify reset` antes de cambiar esta opción.", + "notSpotify": "No puedes cambiar esa opción cuando estás reproduciendo desde Spotify. Usa {{spotifyResetCommand}} antes de cambiar esta opción.", "premiumOrDebugServer": "Este comando solo funciona en el servidor oficial de KMQ o para miembros de KMQ Premium (ver {{premium}}).", "title": "Espera..." }, diff --git a/i18n/fr.json b/i18n/fr.json index 8df8e3be2..aeeec2652 100644 --- a/i18n/fr.json +++ b/i18n/fr.json @@ -75,7 +75,7 @@ "begin": { "ignored": { "noTeam": { - "description": "Créez une équipe en utilisant `{{join}} [nom de l'équipe]` avant de pouvoir commencer le jeu." + "description": "Créez une équipe en utilisant {{join}} team_name:[nom de l'équipe] avant de pouvoir commencer le jeu." }, "title": "Commencer ignoré" } @@ -357,7 +357,7 @@ "interaction": { "failure": { "notHidden": { - "description": "`/guess` ne peut être utilisé que pendant `/play hidden`.", + "description": "{{guessCommand}} ne peut être utilisé que pendant {{playHiddenCommand}}.", "title": "Réponse ignorée" } }, @@ -801,7 +801,7 @@ "listeningSessionNotAvailable": "Certaines options ne sont pas disponibles pendant une session d'écoute.", "notSet": "Non défini", "overview": "En train de jouer les {{limit}} premières chansons parmi un total de {{totalSongs}} chansons disponibles à partir des options suivantes :", - "perCommandHelp": "Vous cherchez des informations sur l'utilisation d'une commande ? Consultez \"{{helpCommand}} [commande]\" pour en savoir plus.", + "perCommandHelp": "Vous cherchez des informations sur l'utilisation d'une commande ? Consultez {{helpCommand}} action:[commande] pour en savoir plus.", "premiumOptionsNonPremiumGame": "Note : le jeu actif n'est pas premium", "preset": "Préréglage", "reset": "{{presetOrOption}} Réinitialiser", @@ -845,7 +845,7 @@ "overrideTeams": { "description": "Si vous vouliez démarrer un jeu {{oldGameType}}, {{end}} ce jeu, appelez {{playOldGameType}}, {{gameSpecificInstructions}}, et ensuite appelez {{begin}}.", "teams": { - "join": "`{{join}} une équipe`" + "join": "{{join}} team_name:[nom de l'équipe] une équipe" }, "title": "Ignorer {{playOldGameType}}" } @@ -925,12 +925,12 @@ "title": "Préréglage supprimé" }, "exported": { - "description": "Importer {{presetName}} en tant que nouveau préréglage dans d'autres serveurs en utilisant :\n`{{presetImport}} {{presetUUID}} [nom_préréglage]`\n\nAlternativement, chargez directement les options du préréglage en utilisant :\n`{{presetLoad}} {{presetUUID}}`", + "description": "Importer {{presetName}} en tant que nouveau préréglage dans d'autres serveurs en utilisant :\n{{presetImport}} `exported_preset:{{presetUUID}} new_preset_name:[nom_préréglage]`\n\nAlternativement, chargez directement les options du préréglage en utilisant :\n{{presetLoad}} `preset_name:{{presetUUID}}`", "title": "Préréglage exporté" }, "failure": { "alreadyExists": { - "description": "Le préréglage {{presetNameFormatted}} existe déjà. Vous pouvez supprimer l'ancien avec `{{presetDelete}} {{presetName}}`.", + "description": "Le préréglage {{presetNameFormatted}} existe déjà. Vous pouvez supprimer l'ancien avec {{presetDelete}} `preset_name:{{presetName}}`.", "title": "Le préréglage existe déjà" }, "illegalPrefix": { @@ -942,7 +942,7 @@ "title": "Nom de préréglage trop long" }, "missingIdentifier": { - "description": "Vous devez spécifier un identifiant de préréglage. Utilisez `{{presetExport}} [nom_préréglage]` pour récupérer l'identifiant d'un préréglage.", + "description": "Vous devez spécifier un identifiant de préréglage. Utilisez {{presetExport}} `preset_name:[nom_préréglage]` pour récupérer l'identifiant d'un préréglage.", "title": "Identifiant de préréglage manquant" }, "missingName": { @@ -979,7 +979,7 @@ } }, "imported": { - "description": "Chargez le nouveau préréglage importé en utilisant `{{presetLoad}} {{presetName}}`.", + "description": "Chargez le nouveau préréglage importé en utilisant {{presetLoad}} `preset_name:{{presetName}}`.", "title": "Préréglage importé" }, "interaction": { @@ -1248,7 +1248,7 @@ "title": "URL de playlist Spotify invalide" }, "matched": { - "description": "{{matchedCount}}/{{totalCount}} chansons trouvées.", + "description": "`{{matchedCount}}/{{totalCount}}` chansons trouvées.", "title": "Lecture de \"{{playlistName}}\" sur Spotify", "truncated": "Note : La playlist a pris trop de temps à être traitée et n'a pas été complètement terminée. Essayez avec une playlist plus petite la prochaine fois." }, @@ -1299,10 +1299,10 @@ }, "subunits": { "help": { - "description": "Choisissez si vous souhaitez inclure les sous-unités d'un groupe lors de l'utilisation de {{groups}}.", + "description": "Choisissez d'inclure ou non les sous-unités avec {{groups}}.", "example": { "exclude": "Ne pas inclure les sous-unités", - "include": "Inclure automatiquement les sous-unités. Par exemple, `{{groupCommand}} {{parentGroup}}` inclurait les chansons de {{parentGroup}}, {{subunitOne}}, {{subunitTwo}}, etc.", + "include": "Inclure automatiquement les sous-unités. Par exemple, {{groupCommand}} group_1:{{parentGroup}} inclurait les chansons de {{parentGroup}}, {{subunitOne}}, {{subunitTwo}}, etc.", "reset": "Réinitialiser à l'option par défaut de {{defaultSubunit}}" }, "name": "sousunités" @@ -1526,7 +1526,7 @@ "notInEnum": "Une des valeurs valides suivantes est attendue pour {{argument}} : ({{validValues}})." }, "numArguments": { - "incorrect": "Nombre incorrect d'arguments. Voir `{{help}} {{command}}` pour l'utilisation." + "incorrect": "Nombre incorrect d'arguments. Voir {{help}} action:{{command}} pour l'utilisation." }, "number": { "max": "Valeur attendue inférieure ou égale à {{max}} pour {{argument}}", @@ -1635,7 +1635,7 @@ "notHidden": "Vous ne pouvez pas faire cela pendant une partie cachée.", "notListeningSession": "Vous ne pouvez pas faire cela pendant une session d'écoute.", "notPremium": "Vous avez besoin de KMQ Premium pour utiliser cette commande (voir {{premium}}).", - "notSpotify": "Vous ne pouvez pas changer cette option lorsque vous jouez depuis Spotify. Utilisez `/spotify reset` avant de changer cette option.", + "notSpotify": "Vous ne pouvez pas changer cette option lorsque vous jouez depuis Spotify. Utilisez {{spotifyResetCommand}} avant de changer cette option.", "premiumOrDebugServer": "Cette commande ne fonctionne que dans le serveur officiel de KMQ ou pour les membres KMQ Premium (voir {{premium}}).", "title": "Attendez..." }, diff --git a/i18n/ja.json b/i18n/ja.json index 9ddff4057..aee11ad9b 100644 --- a/i18n/ja.json +++ b/i18n/ja.json @@ -75,7 +75,7 @@ "begin": { "ignored": { "noTeam": { - "description": "ゲームを開始する前に `{{join}} [チーム名]` を使用してチームを作成してください。" + "description": "ゲームを開始する前に {{join}} team_name:[チーム名] を使用してチームを作成してください。" }, "title": "無視された開始" } @@ -357,7 +357,7 @@ "interaction": { "failure": { "notHidden": { - "description": "`/guess` は `/play hidden` 中にのみ使用できます。", + "description": "{{guessCommand}} は {{playHiddenCommand}} 中にのみ使用できます。", "title": "推測が無視されました" } }, @@ -801,7 +801,7 @@ "listeningSessionNotAvailable": "リスニングセッション中には一部のオプションが利用できません。", "notSet": "未設定", "overview": "現在、以下のオプションから利用可能な{{totalSongs}}曲のうち、トップ{{limit}}曲を再生しています。", - "perCommandHelp": "コマンドの使用方法についての情報をお探しですか?「{{helpCommand}} [command]」をチェックして、詳細を学びましょう。", + "perCommandHelp": "コマンドの使用方法についての情報をお探しですか?{{helpCommand}} action:[コマンド]をチェックして、詳細を学びましょう。", "premiumOptionsNonPremiumGame": "注:アクティブなゲームはプレミアムではありません。", "preset": "プリセット", "reset": "{{presetOrOption}}をリセット", @@ -845,7 +845,7 @@ "overrideTeams": { "description": "{{oldGameType}}ゲームを開始するつもりだった場合は、このゲームを{{end}}し、{{playOldGameType}}を呼び出し、{{gameSpecificInstructions}}を実行してから{{begin}}を呼び出してください。", "teams": { - "join": "`{{join}} [チーム名]` チームに参加する" + "join": "{{join}} team_name:[チーム名] チームに参加する" }, "title": "{{playOldGameType}}を無視する" } @@ -925,12 +925,12 @@ "title": "プリセット削除済み" }, "exported": { - "description": "他のサーバーに新しいプリセットとして{{presetName}}をインポートするには、以下を使用してください:\n`{{presetImport}} {{presetUUID}} [プリセット名]`\n\nまたは、プリセットのオプションを直接ロードするには、以下を使用してください:\n`{{presetLoad}} {{presetUUID}}`", + "description": "他のサーバーに新しいプリセットとして{{presetName}}をインポートするには、以下を使用してください:\n{{presetImport}} `exported_preset:{{presetUUID}} new_preset_name:[プリセット名]`\n\nまたは、プリセットのオプションを直接ロードするには、以下を使用してください:\n{{presetLoad}} `preset_name:{{presetUUID}}`", "title": "プリセットエクスポート済み" }, "failure": { "alreadyExists": { - "description": "プリセット{{presetNameFormatted}}は既に存在しています。古いものは`{{presetDelete}} {{presetName}}`で削除できます。", + "description": "プリセット{{presetNameFormatted}}は既に存在しています。古いものは{{presetDelete}} `preset_name:{{presetName}}`で削除できます。", "title": "プリセットは既に存在しています" }, "illegalPrefix": { @@ -942,7 +942,7 @@ "title": "プリセット名が長すぎます" }, "missingIdentifier": { - "description": "プリセットの識別子を指定する必要があります。`{{presetExport}} [プリセット名]`を使用してプリセットの識別子を取得してください。", + "description": "プリセットの識別子を指定する必要があります。{{presetExport}} `preset_name:[プリセット名]`を使用してプリセットの識別子を取得してください。", "title": "プリセット識別子がありません" }, "missingName": { @@ -979,7 +979,7 @@ } }, "imported": { - "description": "`{{presetLoad}} {{presetName}}` を使用して新しくインポートされたプリセットを読み込みます。", + "description": "{{presetLoad}} `preset_name:{{presetName}}` を使用して新しくインポートされたプリセットを読み込みます。", "title": "プリセットがインポートされました" }, "interaction": { @@ -1248,7 +1248,7 @@ "title": "SpotifyプレイリストURLが無効です" }, "matched": { - "description": "{{matchedCount}}/{{totalCount}}曲がマッチしました。", + "description": "`{{matchedCount}}/{{totalCount}}`曲がマッチしました。", "title": "Spotifyで\"{{playlistName}}\"を再生中", "truncated": "注:プレイリストの処理に時間がかかり、完了しませんでした。次回は小さなプレイリストで再試行してください。" }, @@ -1302,7 +1302,7 @@ "description": "{{groups}}を使用する場合、グループのサブユニットを自動的に含めるかどうかを選択してください。", "example": { "exclude": "サブユニットを含めない", - "include": "サブユニットを自動的に含める。例えば、`{{groupCommand}} {{parentGroup}}`は、{{parentGroup}}、{{subunitOne}}、{{subunitTwo}}などの曲を含みます。", + "include": "サブユニットを自動的に含める。例えば、{{groupCommand}} group_1:{{parentGroup}}は、{{parentGroup}}、{{subunitOne}}、{{subunitTwo}}などの曲を含みます。", "reset": "{{defaultSubunit}}のデフォルトオプションにリセットする" }, "name": "サブユニット" @@ -1526,7 +1526,7 @@ "notInEnum": "有効な{{argument}}の値のうち、次のいずれかを指定してください: ({{validValues}})。" }, "numArguments": { - "incorrect": "引数の数が正しくありません。使用法については、`{{help}} {{command}}`を参照してください。" + "incorrect": "引数の数が正しくありません。使用法については、{{help}} action:{{command}}を参照してください。" }, "number": { "max": "{{argument}}に対して{{max}}以下の値を指定してください。", @@ -1635,7 +1635,7 @@ "notHidden": "非公開ゲーム中はその操作はできません。", "notListeningSession": "リスニングセッション中にはそれはできません。", "notPremium": "このコマンドを使用するには、KMQプレミアムが必要です({{premium}}を参照)。", - "notSpotify": "Spotifyから再生している場合は、このオプションを変更できません。このオプションを変更する前に、`/spotify reset`を使用してください。", + "notSpotify": "Spotifyから再生している場合は、このオプションを変更できません。このオプションを変更する前に、{{spotifyResetCommand}}を使用してください。", "premiumOrDebugServer": "このコマンドは、公式KMQサーバーまたはKMQプレミアムメンバーのみで動作します({{premium}}を参照)。", "title": "お待ちください..." }, diff --git a/i18n/ko.json b/i18n/ko.json index bc1d3acd6..2ab13e2e5 100644 --- a/i18n/ko.json +++ b/i18n/ko.json @@ -75,7 +75,7 @@ "begin": { "ignored": { "noTeam": { - "description": "게임을 시작하기 전에 `{{join}} [팀명]`을(를) 사용하여 팀을 만드십시오." + "description": "게임을 시작하기 전에 {{join}} team_name[팀명]을(를) 사용하여 팀을 만드십시오." }, "title": "게임 시작 무시" } @@ -357,7 +357,7 @@ "interaction": { "failure": { "notHidden": { - "description": "`/guess`는 `/play hidden` 중에만 사용할 수 있습니다.", + "description": "{{guessCommand}}는 {{playHiddenCommand}} 중에만 사용할 수 있습니다.", "title": "추측 무시됨" } }, @@ -801,7 +801,7 @@ "listeningSessionNotAvailable": "청취 세션 중에는 일부 옵션을 사용할 수 없습니다.", "notSet": "설정되지 않음", "overview": "이제 다음 옵션에서 사용 가능한 {{totalSongs}}곡 중 상위 {{limit}}곡을 재생합니다.", - "perCommandHelp": "명령어 사용 방법에 대한 정보를 찾고 계십니까? 자세한 내용은 \"{{helpCommand}} [명령어]\"을(를) 확인하세요.", + "perCommandHelp": "명령어 사용 방법에 대한 정보를 찾고 계십니까? 자세한 내용은 {{helpCommand}} action:[명령어]을(를) 확인하세요.", "premiumOptionsNonPremiumGame": "참고: 액티브 게임은 프리미엄이 아닙니다.", "preset": "사전 설정", "reset": "{{presetOrOption}}으(로) 재설정합니다", @@ -845,7 +845,7 @@ "overrideTeams": { "description": "{{oldGameType}} 게임, {{end}} 이 게임을 시작하려는 경우 {{playOldGameType}}, {{gameSpecificInstructions}}을(를) 호출한 다음 {{{begin}}을(를) 호출합니다.", "teams": { - "join": "`{{join}} [팀 이름]` 팀에 입장하셨습니다." + "join": "{{join}} team_name:[팀 이름] 팀에 입장하셨습니다." }, "title": "{{playOldGameType}} 무시" } @@ -925,12 +925,12 @@ "title": "사전 설정이 삭제됨." }, "exported": { - "description": "다음을 사용하여 {{presetName}}을(를) 다른 서버의 새 사전 설정으로 가져옵니다.\n`{{presetImport}} {{presetUUID}} [preset_name]`\n\n또는 다음을 사용하여 사전 설정 옵션을 직접 로드합니다.\n`{{presetLoad}} {{presetUUID}}`", + "description": "다음을 사용하여 {{presetName}}을(를) 다른 서버의 새 사전 설정으로 가져옵니다.\n{{presetImport}} `exported_preset:{{presetUUID}} new_preset_name:[사전 설정 이름]`\n\n또는 다음을 사용하여 사전 설정 옵션을 직접 로드합니다.\n{{presetLoad}} `preset_name:{{presetUUID}}`", "title": "사전 설정을 내보냄." }, "failure": { "alreadyExists": { - "description": "사전 설정 {{presetNameFormatted}}이(가) 이미 존재합니다. `{{presetDelete}} {{presetName}}`으로 이전 항목을 삭제할 수 있습니다.", + "description": "사전 설정 {{presetNameFormatted}}이(가) 이미 존재합니다. {{presetDelete}} `preset_name:{{presetName}}`으로 이전 항목을 삭제할 수 있습니다.", "title": "사전 설정이 이미 있음." }, "illegalPrefix": { @@ -942,7 +942,7 @@ "title": "사전 설정 이름이 너무 긺." }, "missingIdentifier": { - "description": "미리 설정된 식별자를 지정해야 합니다. 사전 설정의 식별자를 검색하려면 `{{presetExport}} [사전 설정 이름]`을(를) 사용하십시오.", + "description": "미리 설정된 식별자를 지정해야 합니다. 사전 설정의 식별자를 검색하려면 {{presetExport}} `preset_name:[사전 설정 이름]`을(를) 사용하십시오.", "title": "사전 설정 식별자 누락" }, "missingName": { @@ -979,7 +979,7 @@ } }, "imported": { - "description": "`{{presetLoad}} {{presetName}}`을(를) 사용하여 새로 가져온 사전 설정을 로드합니다.", + "description": "{{presetLoad}} `preset_name:{{presetName}}`을(를) 사용하여 새로 가져온 사전 설정을 로드합니다.", "title": "사전 설정을 가져옴." }, "interaction": { @@ -1302,7 +1302,7 @@ "description": "{{groups}}을(를) 사용할 때 그룹의 하위 단위를 자동으로 포함할지 여부를 선택합니다.", "example": { "exclude": "하위 단위를 포함하지 마십시오", - "include": "하위 단위를 자동으로 포함합니다. 예를 들어 `{{groupCommand}} {{parentGroup}}`에는 {{parentGroup}}, {{subunitOne}}, {{subunitTwo}} 등의 노래가 포함됩니다.", + "include": "하위 단위를 자동으로 포함합니다. 예를 들어 {{groupCommand}} group_1:{{parentGroup}}에는 {{parentGroup}}, {{subunitOne}}, {{subunitTwo}} 등의 노래가 포함됩니다.", "reset": "{{defaultSubunit}}의 기본 옵션으로 재설정합니다." }, "name": "소단위" @@ -1526,7 +1526,7 @@ "notInEnum": "다음 유효한 {{argument}} 값 중 하나가 필요합니다: ({{validValues}})." }, "numArguments": { - "incorrect": "인수 수가 잘못되었습니다. 사용법은 `{{help}} {{command}}`을(를) 참조하세요." + "incorrect": "인수 수가 잘못되었습니다. 사용법은 {{help}} action:{{command}}을(를) 참조하세요." }, "number": { "max": "{{argument}}에 대해 {{max}}보다 작거나 같은 예상 값입니다.", @@ -1635,7 +1635,7 @@ "notHidden": "히든 게임 중에는 이 작업을 수행할 수 없습니다.", "notListeningSession": "청취 세션 중에는 이 작업을 수행할 수 없습니다.", "notPremium": "이 명령어를 사용하려면 KMQ 프리미엄이 필요합니다. ({{premium}} 참조.)", - "notSpotify": "Spotify에서 재생할 때는 이 옵션을 변경할 수 없습니다. 이 옵션을 변경하기 전에 `/spotify reset`을(를) 사용하세요.", + "notSpotify": "Spotify에서 재생할 때는 이 옵션을 변경할 수 없습니다. 이 옵션을 변경하기 전에 {{spotifyResetCommand}}을(를) 사용하세요.", "premiumOrDebugServer": "이 명령어는 공식 KMQ 서버 또는 KMQ 프리미엄 회원에게만 작동합니다. ({{premium}} 참조.)", "title": "잠시만 기다려주십시오..." }, diff --git a/i18n/zh-CN.json b/i18n/zh-CN.json index 1e061991d..03be0b00b 100644 --- a/i18n/zh-CN.json +++ b/i18n/zh-CN.json @@ -75,7 +75,7 @@ "begin": { "ignored": { "noTeam": { - "description": "在开始游戏之前,请使用 `{{join}} [团队名称]` 创建一个团队。" + "description": "在开始游戏之前,请使用 {{join}} team_name:[团队名称] 创建一个团队。" }, "title": "开始被忽略" } @@ -357,7 +357,7 @@ "interaction": { "failure": { "notHidden": { - "description": "`/guess` 只能在 `/play hidden` 期间使用。", + "description": "{{guessCommand}} 只能在 {{playHiddenCommand}} 期间使用。", "title": "猜测被忽略" } }, @@ -801,7 +801,7 @@ "listeningSessionNotAvailable": "在听歌会话期间,某些选项不可用。", "notSet": "未设置", "overview": "现在播放以下选项中可用的前{{limit}}首歌曲中的前{{totalSongs}}首:", - "perCommandHelp": "需要了解如何使用命令吗?查看“{{helpCommand}} [command]”以了解更多信息。", + "perCommandHelp": "需要了解如何使用命令吗?查看{{helpCommand}} action:[命令]以了解更多信息。", "premiumOptionsNonPremiumGame": "注意:活动游戏不是高级版", "preset": "预设", "reset": "{{presetOrOption}} 重置", @@ -845,7 +845,7 @@ "overrideTeams": { "description": "如果您想开始{{oldGameType}}游戏,请{{end}}此游戏,调用{{playOldGameType}},{{gameSpecificInstructions}},然后调用{{begin}}。", "teams": { - "join": "`{{join}} [队伍名称]` 一个团队" + "join": "{{join}} team_name:[队伍名称] 一个团队" }, "title": "忽略 {{playOldGameType}}" } @@ -925,12 +925,12 @@ "title": "预设已删除" }, "exported": { - "description": "使用以下命令将 {{presetName}} 导入其他服务器作为新预设:\n`{{presetImport}} {{presetUUID}} [预设名称]`\n\n或者,直接使用以下命令加载预设选项:\n`{{presetLoad}} {{presetUUID}}`", + "description": "使用以下命令将 {{presetName}} 导入其他服务器作为新预设:\n{{presetImport}} `exported_preset:{{presetUUID}} new_preset_name:[预设名称]`\n\n或者,直接使用以下命令加载预设选项:\n{{presetLoad}} `preset_name:{{presetUUID}}`", "title": "预设已导出" }, "failure": { "alreadyExists": { - "description": "预设 {{presetNameFormatted}} 已存在。您可以使用 `{{presetDelete}} {{presetName}}` 删除旧预设。", + "description": "预设 {{presetNameFormatted}} 已存在。您可以使用 {{presetDelete}} `preset_name:{{presetName}}` 删除旧预设。", "title": "预设已存在" }, "illegalPrefix": { @@ -942,7 +942,7 @@ "title": "预设名称过长" }, "missingIdentifier": { - "description": "您必须指定一个预设标识符。使用 `{{presetExport}} [preset_name]` 来检索预设的标识符。", + "description": "您必须指定一个预设标识符。使用 {{presetExport}} `preset_name:[preset_name]` 来检索预设的标识符。", "title": "缺少预设标识符" }, "missingName": { @@ -979,7 +979,7 @@ } }, "imported": { - "description": "使用 `{{presetLoad}} {{presetName}}` 加载新导入的预设。", + "description": "使用 {{presetLoad}} `preset_name:{{presetName}}` 加载新导入的预设。", "title": "导入的预设" }, "interaction": { @@ -1248,7 +1248,7 @@ "title": "无效的 Spotify 播放列表链接" }, "matched": { - "description": "匹配了 {{matchedCount}}/{{totalCount}} 首歌曲。", + "description": "匹配了 `{{matchedCount}}/{{totalCount}}` 首歌曲。", "title": "正在 Spotify 上播放“{{playlistName}}”", "truncated": "注意:播放列表处理时间过长,未能完成。请尝试使用较小的播放列表。" }, @@ -1302,7 +1302,7 @@ "description": "选择是否在使用 {{groups}} 时自动包括组的子单元。", "example": { "exclude": "不包括子单元", - "include": "自动包括子单元。例如,`{{groupCommand}} {{parentGroup}}` 将包括 {{parentGroup}},{{subunitOne}},{{subunitTwo}} 等歌曲。", + "include": "自动包括子单元。例如,{{groupCommand}} group_1:{{parentGroup}} 将包括 {{parentGroup}},{{subunitOne}},{{subunitTwo}} 等歌曲。", "reset": "重置为默认选项 {{defaultSubunit}}。" }, "name": "子单位" @@ -1526,7 +1526,7 @@ "notInEnum": "{{argument}} 应该是以下有效值之一:({{validValues}})。" }, "numArguments": { - "incorrect": "参数数量不正确。请参考 `{{help}} {{command}}` 以了解用法。" + "incorrect": "参数数量不正确。请参考 {{help}} action:{{command}} 以了解用法。" }, "number": { "max": "{{argument}} 应该小于等于 {{max}}。", @@ -1635,7 +1635,7 @@ "notHidden": "在隐藏游戏期间无法进行该操作。", "notListeningSession": "您不能在听歌会话中进行此操作。", "notPremium": "您需要 KMQ Premium 才能使用此命令(请参见{{premium}})。", - "notSpotify": "您不能在从 Spotify 播放时更改该选项。请在更改此选项之前使用 `/spotify reset`。", + "notSpotify": "您不能在从 Spotify 播放时更改该选项。请在更改此选项之前使用 {{spotifyResetCommand}}。", "premiumOrDebugServer": "此命令仅适用于官方 KMQ 服务器或 KMQ Premium 成员(请参见{{premium}})。", "title": "请稍等..." }, diff --git a/src/command_prechecks.ts b/src/command_prechecks.ts index e523b36f1..6ad385039 100644 --- a/src/command_prechecks.ts +++ b/src/command_prechecks.ts @@ -7,6 +7,7 @@ import { sendErrorMessage, tryCreateInteractionErrorAcknowledgement, } from "./helpers/discord_utils"; +import { clickableSlashCommand } from "./helpers/utils"; import { getTimeUntilRestart } from "./helpers/management_utils"; import { isUserPremium } from "./helpers/game_utils"; import AnswerType from "./enums/option_types/answer_type"; @@ -324,7 +325,7 @@ export default class CommandPrechecks { description: i18n.translate( messageContext.guildID, "misc.preCheck.notPremium", - { premium: "`/premium`" }, + { premium: clickableSlashCommand("premium") }, ), }; @@ -359,7 +360,7 @@ export default class CommandPrechecks { description: i18n.translate( messageContext.guildID, "misc.preCheck.premiumOrDebugServer", - { premium: "`/premium`" }, + { premium: clickableSlashCommand("premium") }, ), }; @@ -385,6 +386,12 @@ export default class CommandPrechecks { description: i18n.translate( messageContext.guildID, "misc.preCheck.notSpotify", + { + spotifyResetCommand: clickableSlashCommand( + "spotify", + OptionAction.RESET, + ), + }, ), }; diff --git a/src/commands/game_commands/guess.ts b/src/commands/game_commands/guess.ts index 02ade13ba..ea1d24571 100644 --- a/src/commands/game_commands/guess.ts +++ b/src/commands/game_commands/guess.ts @@ -116,6 +116,13 @@ export default class GuessCommand implements BaseCommand { i18n.translate( messageContext.guildID, "command.guess.interaction.failure.notHidden.description", + { + guessCommand: clickableSlashCommand(COMMAND_NAME), + playHiddenCommand: clickableSlashCommand( + "play", + GameType.HIDDEN, + ), + }, ), ); return; diff --git a/src/commands/game_commands/leaderboard.ts b/src/commands/game_commands/leaderboard.ts index 5eca84460..d00027f00 100644 --- a/src/commands/game_commands/leaderboard.ts +++ b/src/commands/game_commands/leaderboard.ts @@ -1064,7 +1064,9 @@ export default class LeaderboardCommand implements BaseCommand { messageContext.guildID, chooseRandom(leaderboardQuotes), { - command: "/help leaderboard", + command: `${clickableSlashCommand( + "help", + )} action:${COMMAND_NAME}`, }, ), }, diff --git a/src/commands/game_commands/listen.ts b/src/commands/game_commands/listen.ts index cd8d8eda2..d87170728 100644 --- a/src/commands/game_commands/listen.ts +++ b/src/commands/game_commands/listen.ts @@ -165,7 +165,7 @@ export default class ListenCommand implements BaseCommand { description: i18n.translate( messageContext.guildID, "misc.failure.notInVC.description", - { command: "`/listen`" }, + { command: clickableSlashCommand(COMMAND_NAME) }, ), }, interaction, diff --git a/src/commands/game_commands/lookup.ts b/src/commands/game_commands/lookup.ts index bd0a4977c..690e5a088 100644 --- a/src/commands/game_commands/lookup.ts +++ b/src/commands/game_commands/lookup.ts @@ -2,6 +2,7 @@ import { IPCLogger } from "../../logger"; import { KmqImages, SHADOW_BANNED_ARTIST_IDS } from "../../constants"; import { chunkArray, + clickableSlashCommand, containsHangul, friendlyFormattedDate, friendlyFormattedNumber, @@ -47,6 +48,9 @@ import type MatchedArtist from "src/interfaces/matched_artist"; import type QueriedSong from "../../interfaces/queried_song"; const COMMAND_NAME = "lookup"; +const SONG_NAME = "song_name"; +const SONG_LINK = "song_link"; +const ARTIST_NAME = "artist_name"; const logger = new IPCLogger(COMMAND_NAME); const getDaisukiLink = (id: number, isMV: boolean): string => { @@ -410,7 +414,10 @@ export default class LookupCommand implements BaseCommand { description: i18n.translate(guildID, "command.lookup.help.description"), examples: [ { - example: "`/lookup song_name song_name:love dive`", + example: `${clickableSlashCommand( + COMMAND_NAME, + SONG_NAME, + )} ${SONG_NAME}:love dive`, explanation: i18n.translate( guildID, "command.lookup.help.example.song", @@ -418,8 +425,10 @@ export default class LookupCommand implements BaseCommand { ), }, { - example: - "`/lookup song_link song_link:https://www.youtube.com/watch?v=4TWR90KJl84`", + example: `${clickableSlashCommand( + COMMAND_NAME, + SONG_LINK, + )} ${SONG_LINK}:https://www.youtube.com/watch?v=4TWR90KJl84`, explanation: i18n.translate( guildID, "command.lookup.help.example.song", @@ -437,7 +446,7 @@ export default class LookupCommand implements BaseCommand { type: Eris.Constants.ApplicationCommandTypes.CHAT_INPUT, options: [ { - name: "song_name", + name: SONG_NAME, description: i18n.translate( LocaleType.EN, "command.lookup.help.interaction.byName.description", @@ -459,7 +468,7 @@ export default class LookupCommand implements BaseCommand { .SUB_COMMAND, options: [ { - name: "song_name", + name: SONG_NAME, description: i18n.translate( LocaleType.EN, "command.lookup.help.interaction.byName.field.song", @@ -482,7 +491,7 @@ export default class LookupCommand implements BaseCommand { autocomplete: true, }, { - name: "artist_name", + name: ARTIST_NAME, description: i18n.translate( LocaleType.EN, "command.lookup.help.interaction.byName.field.artist", @@ -507,7 +516,7 @@ export default class LookupCommand implements BaseCommand { ], }, { - name: "song_link", + name: SONG_LINK, description: i18n.translate( LocaleType.EN, "command.lookup.help.interaction.byLink.description", @@ -529,7 +538,7 @@ export default class LookupCommand implements BaseCommand { .SUB_COMMAND, options: [ { - name: "song_link", + name: SONG_LINK, description: i18n.translate( LocaleType.EN, "command.lookup.help.interaction.byLink.field", @@ -689,16 +698,15 @@ export default class LookupCommand implements BaseCommand { _messageContext: MessageContext, ): Promise { const interactionData = getInteractionValue(interaction); - if (interactionData.interactionName === "song_link") { + if (interactionData.interactionName === SONG_LINK) { await this.lookupSong( interaction, - interactionData.interactionOptions["song_link"], + interactionData.interactionOptions[SONG_LINK], ); - } else if (interactionData.interactionName === "song_name") { - const songName = interactionData.interactionOptions["song_name"]; + } else if (interactionData.interactionName === SONG_NAME) { + const songName = interactionData.interactionOptions[SONG_NAME]; - const artistName = - interactionData.interactionOptions["artist_name"]; + const artistName = interactionData.interactionOptions[ARTIST_NAME]; let artistID: number | undefined; if (artistName) { @@ -739,9 +747,8 @@ export default class LookupCommand implements BaseCommand { State.getGuildLocale(interaction.guildID as string) === LocaleType.KO; - if (focusedKey === "song_name") { - const artistName = - interactionData.interactionOptions["artist_name"]; + if (focusedKey === SONG_NAME) { + const artistName = interactionData.interactionOptions[ARTIST_NAME]; let artistID: number | undefined; if (artistName) { @@ -785,9 +792,9 @@ export default class LookupCommand implements BaseCommand { ), ); } - } else if (focusedKey === "artist_name") { + } else if (focusedKey === ARTIST_NAME) { const enteredSongName = - interactionData.interactionOptions["song_name"]; + interactionData.interactionOptions[SONG_NAME]; let matchingArtists: Array = []; if (!enteredSongName) { diff --git a/src/commands/game_commands/preset.ts b/src/commands/game_commands/preset.ts index 278a2a406..5dae71ced 100644 --- a/src/commands/game_commands/preset.ts +++ b/src/commands/game_commands/preset.ts @@ -809,7 +809,10 @@ export default class PresetCommand implements BaseCommand { messageContext.guildID, "command.preset.savedOrReplaced.description", { - presetLoad: `\`/preset load ${presetName}\``, + presetLoad: `${clickableSlashCommand( + COMMAND_NAME, + PresetAction.LOAD, + )} preset_name:${presetName}`, }, ), thumbnailUrl: KmqImages.HAPPY, @@ -888,7 +891,10 @@ export default class PresetCommand implements BaseCommand { messageContext.guildID, "command.preset.savedOrReplaced.description", { - presetLoad: `\`/preset load ${presetName}\``, + presetLoad: `${clickableSlashCommand( + COMMAND_NAME, + PresetAction.LOAD, + )} preset_name:${presetName}`, }, ), thumbnailUrl: KmqImages.HAPPY, @@ -951,9 +957,15 @@ export default class PresetCommand implements BaseCommand { "command.preset.exported.description", { presetName: `\`${presetName}\``, - presetImport: "/preset import", + presetImport: clickableSlashCommand( + COMMAND_NAME, + PresetAction.IMPORT, + ), presetUUID, - presetLoad: "/preset load", + presetLoad: clickableSlashCommand( + COMMAND_NAME, + PresetAction.LOAD, + ), }, ), thumbnailUrl: KmqImages.THUMBS_UP, @@ -991,7 +1003,10 @@ export default class PresetCommand implements BaseCommand { "command.preset.failure.alreadyExists.description", { presetNameFormatted: `\`${presetName}\``, - presetDelete: "/preset delete", + presetDelete: clickableSlashCommand( + COMMAND_NAME, + PresetAction.DELETE, + ), presetName, }, ), @@ -1086,7 +1101,10 @@ export default class PresetCommand implements BaseCommand { messageContext.guildID, "command.preset.imported.description", { - presetLoad: "/preset load", + presetLoad: clickableSlashCommand( + COMMAND_NAME, + PresetAction.LOAD, + ), presetName, }, ), @@ -1119,7 +1137,9 @@ export default class PresetCommand implements BaseCommand { messageContext.guildID, "command.preset.list.failure.noPresets.description", { - presetHelp: "`/help preset`", + presetHelp: `${clickableSlashCommand( + "help", + )} action:${COMMAND_NAME}`, }, ), footerText: diff --git a/src/commands/game_commands/profile.ts b/src/commands/game_commands/profile.ts index 05c04c200..87f8e1e7a 100644 --- a/src/commands/game_commands/profile.ts +++ b/src/commands/game_commands/profile.ts @@ -367,7 +367,9 @@ export default class ProfileCommand implements BaseCommand { message.guildID, "command.profile.failure.notFound.description", { - profileHelp: "`/help profile`", + profileHelp: `${clickableSlashCommand( + "help", + )} action:${COMMAND_NAME}`, }, ), }); @@ -383,7 +385,11 @@ export default class ProfileCommand implements BaseCommand { description: i18n.translate( message.guildID, "command.profile.failure.notFound.badUsage.description", - { profileHelp: "`/help profile`" }, + { + profileHelp: `${clickableSlashCommand( + "help", + )} action:${COMMAND_NAME}`, + }, ), }); return; @@ -473,7 +479,9 @@ export default class ProfileCommand implements BaseCommand { interaction.guildID as string, "misc.interaction.profile.inaccessible", { - profileUserID: `\`/profile ${userId}\``, + profileUserID: `${clickableSlashCommand( + COMMAND_NAME, + )} user_id:${userId}`, }, ), ); diff --git a/src/commands/game_options/add.ts b/src/commands/game_options/add.ts index 8afd3f7c2..2c8957542 100644 --- a/src/commands/game_options/add.ts +++ b/src/commands/game_options/add.ts @@ -1,5 +1,11 @@ -import { EMBED_ERROR_COLOR, KmqImages } from "../../constants"; +import { + EMBED_ERROR_COLOR, + GroupAction, + KmqImages, + OptionAction, +} from "../../constants"; import { IPCLogger } from "../../logger"; +import { clickableSlashCommand, setIntersection } from "../../helpers/utils"; import { generateOptionsMessage, getDebugLogHeader, @@ -11,7 +17,6 @@ import { getMatchingGroupNames, getSimilarGroupNames, } from "../../helpers/game_utils"; -import { setIntersection } from "../../helpers/utils"; import CommandPrechecks from "../../command_prechecks"; import GameOption from "../../enums/game_option_name"; import GuildPreference from "../../structures/guild_preference"; @@ -154,7 +159,9 @@ export default class AddCommand implements BaseCommand { messageContext.guildID, "misc.failure.unrecognizedGroups.added", ), - helpGroups: "`/help groups`", + helpGroups: `${clickableSlashCommand( + "help", + )} action:groups`, unmatchedGroups: unmatchedGroups.join(", "), solution: "", }, @@ -215,13 +222,21 @@ export default class AddCommand implements BaseCommand { messageContext.guildID, "misc.failure.groupsExcludeConflict.description", { - conflictingOptionOne: "`/groups`", - conflictingOptionTwo: "`/exclude`", + conflictingOptionOne: + clickableSlashCommand("groups"), + conflictingOptionTwo: + clickableSlashCommand("exclude"), groupsList: [...intersection] .filter((x) => !x.includes("+")) .join(", "), - solutionStepOne: "`/exclude remove`", - solutionStepTwo: "`/groups add`", + solutionStepOne: clickableSlashCommand( + "exclude", + GroupAction.REMOVE, + ), + solutionStepTwo: clickableSlashCommand( + "groups", + GroupAction.ADD, + ), allowOrPrevent: i18n.translate( messageContext.guildID, "misc.failure.groupsExcludeConflict.allow", @@ -261,7 +276,7 @@ export default class AddCommand implements BaseCommand { )} | Game option conflict between include and groups.`, ); - sendErrorMessage( + await sendErrorMessage( messageContext, { title: i18n.translate( @@ -272,9 +287,12 @@ export default class AddCommand implements BaseCommand { messageContext.guildID, "misc.failure.gameOptionConflict.description", { - optionOne: "`groups`", - optionTwo: "`include`", - optionOneCommand: "`/groups reset`", + optionOne: clickableSlashCommand("groups"), + optionTwo: clickableSlashCommand("include"), + optionOneCommand: clickableSlashCommand( + "groups", + OptionAction.RESET, + ), }, ), }, @@ -309,13 +327,21 @@ export default class AddCommand implements BaseCommand { messageContext.guildID, "misc.failure.groupsExcludeConflict.description", { - conflictingOptionOne: "`/exclude`", - conflictingOptionTwo: "`/groups`", + conflictingOptionOne: + clickableSlashCommand("exclude"), + conflictingOptionTwo: + clickableSlashCommand("groups"), groupsList: [...intersection] .filter((x) => !x.includes("+")) .join(", "), - solutionStepOne: "`/groups remove`", - solutionStepTwo: "`/exclude add`", + solutionStepOne: clickableSlashCommand( + "groups", + GroupAction.REMOVE, + ), + solutionStepTwo: clickableSlashCommand( + "exclude", + GroupAction.ADD, + ), allowOrPrevent: i18n.translate( messageContext.guildID, "misc.failure.groupsExcludeConflict.prevent", diff --git a/src/commands/game_options/artisttype.ts b/src/commands/game_options/artisttype.ts index 0083cabe4..2e7a2cd63 100644 --- a/src/commands/game_options/artisttype.ts +++ b/src/commands/game_options/artisttype.ts @@ -244,9 +244,12 @@ export default class ArtistTypeCommand implements BaseCommand { messageContext.guildID, "misc.failure.gameOptionConflict.description", { - optionOne: "`groups`", - optionTwo: "`artisttype`", - optionOneCommand: "`/groups reset`", + optionOne: clickableSlashCommand("groups"), + optionTwo: clickableSlashCommand("artisttype"), + optionOneCommand: clickableSlashCommand( + "groups", + OptionAction.RESET, + ), }, ), color: EMBED_ERROR_COLOR, diff --git a/src/commands/game_options/exclude.ts b/src/commands/game_options/exclude.ts index f94ca214f..12169c74a 100644 --- a/src/commands/game_options/exclude.ts +++ b/src/commands/game_options/exclude.ts @@ -104,7 +104,10 @@ export default class ExcludeCommand implements BaseCommand { groupOne: "BESTie", groupTwo: "Dia", groupThree: "IKON", - exclude: "`/exclude`", + exclude: clickableSlashCommand( + COMMAND_NAME, + GroupAction.ADD, + ), }, ), }, @@ -120,7 +123,10 @@ export default class ExcludeCommand implements BaseCommand { groupOne: "BESTie", groupTwo: "Dia", groupThree: "iKON", - exclude: "`/exclude`", + exclude: clickableSlashCommand( + COMMAND_NAME, + GroupAction.REMOVE, + ), }, ), }, @@ -342,13 +348,19 @@ export default class ExcludeCommand implements BaseCommand { messageContext.guildID, "misc.failure.groupsExcludeConflict.description", { - conflictingOptionOne: "`exclude`", - conflictingOptionTwo: "`groups`", + conflictingOptionOne: + clickableSlashCommand(COMMAND_NAME), + conflictingOptionTwo: + clickableSlashCommand("groups"), groupsList: [...intersection] .filter((x) => !x.includes("+")) .join(", "), - solutionStepOne: "`/groups remove`", - solutionStepTwo: "`/exclude`", + solutionStepOne: clickableSlashCommand( + "groups", + GroupAction.REMOVE, + ), + solutionStepTwo: + clickableSlashCommand(COMMAND_NAME), allowOrPrevent: i18n.translate( messageContext.guildID, "misc.failure.groupsExcludeConflict.prevent", @@ -427,13 +439,18 @@ export default class ExcludeCommand implements BaseCommand { messageContext.guildID, "command.exclude.failure.unrecognizedGroups.excluded", ), - helpGroups: "`/help groups`", + helpGroups: `${clickableSlashCommand( + "help", + )} action:groups`, unmatchedGroups: `${unmatchedGroups.join(", ")}`, solution: i18n.translate( messageContext.guildID, "misc.failure.unrecognizedGroups.solution", { - command: "`/exclude add`", + command: clickableSlashCommand( + COMMAND_NAME, + GroupAction.ADD, + ), }, ), }, diff --git a/src/commands/game_options/gender.ts b/src/commands/game_options/gender.ts index fd6a56a15..8f025aa40 100644 --- a/src/commands/game_options/gender.ts +++ b/src/commands/game_options/gender.ts @@ -62,7 +62,10 @@ export default class GenderCommand implements BaseCommand { male: "`male`", female: "`female`", coed: "`coed`", - genderAlternating: "`/gender alternating`", + genderAlternating: clickableSlashCommand( + COMMAND_NAME, + "alternating", + ), }, ), examples: [ @@ -261,7 +264,7 @@ export default class GenderCommand implements BaseCommand { )} | Game option conflict between gender and groups.`, ); - sendErrorMessage( + await sendErrorMessage( messageContext, { title: i18n.translate( @@ -272,9 +275,12 @@ export default class GenderCommand implements BaseCommand { messageContext.guildID, "misc.failure.gameOptionConflict.description", { - optionOne: "`groups`", - optionTwo: "`gender`", - optionOneCommand: "`/groups reset`", + optionOne: clickableSlashCommand("groups"), + optionTwo: clickableSlashCommand(COMMAND_NAME), + optionOneCommand: clickableSlashCommand( + "groups", + OptionAction.RESET, + ), }, ), }, @@ -300,8 +306,10 @@ export default class GenderCommand implements BaseCommand { messageContext.guildID, "command.gender.warning.gameOption.description", { - alternatingGenderCommand: - "`/gender alternating`", + alternatingGenderCommand: `${clickableSlashCommand( + COMMAND_NAME, + OptionAction.SET, + )} gender_1:alternating`, }, ), }, diff --git a/src/commands/game_options/goal.ts b/src/commands/game_options/goal.ts index 1fc4ea41f..d86bdba51 100644 --- a/src/commands/game_options/goal.ts +++ b/src/commands/game_options/goal.ts @@ -232,10 +232,19 @@ export default class GoalCommand implements BaseCommand { messageContext.guildID, "command.goal.failure.gameOptionConflict.description", { - elimination: `\`${GameType.ELIMINATION}\``, - goal: "`goal`", - classic: `\`${GameType.CLASSIC}\``, - teams: `\`${GameType.TEAMS}\``, + elimination: clickableSlashCommand( + "play", + GameType.ELIMINATION, + ), + goal: clickableSlashCommand(COMMAND_NAME), + classic: clickableSlashCommand( + "play", + GameType.CLASSIC, + ), + teams: clickableSlashCommand( + "play", + GameType.TEAMS, + ), }, ), }, diff --git a/src/commands/game_options/groups.ts b/src/commands/game_options/groups.ts index 33cdfb277..53a22d5f4 100644 --- a/src/commands/game_options/groups.ts +++ b/src/commands/game_options/groups.ts @@ -98,7 +98,10 @@ export default class GroupsCommand implements BaseCommand { { groupOne: "Twice", groupTwo: "Red Velvet", - groups: "`/groups`", + groups: clickableSlashCommand( + COMMAND_NAME, + GroupAction.ADD, + ), }, ), }, @@ -113,7 +116,10 @@ export default class GroupsCommand implements BaseCommand { { groupOne: "Twice", groupTwo: "Red Velvet", - groups: "`/groups`", + groups: clickableSlashCommand( + COMMAND_NAME, + GroupAction.REMOVE, + ), }, ), }, @@ -278,13 +284,19 @@ export default class GroupsCommand implements BaseCommand { messageContext.guildID, "misc.failure.groupsExcludeConflict.description", { - conflictingOptionOne: "`groups`", - conflictingOptionTwo: "`exclude`", + conflictingOptionOne: + clickableSlashCommand(COMMAND_NAME), + conflictingOptionTwo: + clickableSlashCommand("exclude"), groupsList: [...intersection] .filter((x) => !x.includes("+")) .join(", "), - solutionStepOne: "`/exclude remove`", - solutionStepTwo: "`/groups`", + solutionStepOne: clickableSlashCommand( + "exclude", + GroupAction.REMOVE, + ), + solutionStepTwo: + clickableSlashCommand(COMMAND_NAME), allowOrPrevent: i18n.translate( messageContext.guildID, "misc.failure.groupsExcludeConflict.allow", @@ -355,13 +367,18 @@ export default class GroupsCommand implements BaseCommand { messageContext.guildID, "misc.failure.unrecognizedGroups.added", ), - helpGroups: "`/help groups`", + helpGroups: `${clickableSlashCommand( + "help", + )} action${COMMAND_NAME}`, unmatchedGroups: unmatchedGroups.join(", "), solution: i18n.translate( messageContext.guildID, "misc.failure.unrecognizedGroups.solution", { - command: "`/groups add`", + command: clickableSlashCommand( + COMMAND_NAME, + GroupAction.ADD, + ), }, ), }, diff --git a/src/commands/game_options/include.ts b/src/commands/game_options/include.ts index afd32b9c8..006b57382 100644 --- a/src/commands/game_options/include.ts +++ b/src/commands/game_options/include.ts @@ -3,6 +3,7 @@ import { GROUP_LIST_URL, GroupAction, KmqImages, + OptionAction, } from "../../constants"; import { IPCLogger } from "../../logger"; import { clickableSlashCommand, getOrdinalNum } from "../../helpers/utils"; @@ -56,8 +57,8 @@ export default class IncludeCommand implements BaseCommand { guildID, "command.include.help.description", { - gender: "`gender`", - artisttype: "`artisttype`", + gender: clickableSlashCommand("gender"), + artisttype: clickableSlashCommand("artisttype"), groupList: GROUP_LIST_URL, }, ), @@ -98,7 +99,10 @@ export default class IncludeCommand implements BaseCommand { "command.add.help.example.include", { groupOne: "EXO", - include: "`/include`", + include: clickableSlashCommand( + COMMAND_NAME, + GroupAction.ADD, + ), }, ), }, @@ -112,7 +116,10 @@ export default class IncludeCommand implements BaseCommand { "command.remove.help.example.include", { group: "exo", - include: "`/include`", + include: clickableSlashCommand( + COMMAND_NAME, + GroupAction.REMOVE, + ), }, ), }, @@ -266,7 +273,7 @@ export default class IncludeCommand implements BaseCommand { )} | Game option conflict between include and groups.`, ); - sendErrorMessage( + await sendErrorMessage( messageContext, { title: i18n.translate( @@ -277,9 +284,12 @@ export default class IncludeCommand implements BaseCommand { messageContext.guildID, "misc.failure.gameOptionConflict.description", { - optionOne: "`groups`", - optionTwo: "`include`", - optionOneCommand: "`/groups reset`", + optionOne: clickableSlashCommand("groups"), + optionTwo: clickableSlashCommand(COMMAND_NAME), + optionOneCommand: clickableSlashCommand( + "groups", + OptionAction.RESET, + ), }, ), }, @@ -353,13 +363,18 @@ export default class IncludeCommand implements BaseCommand { messageContext.guildID, "command.include.failure.unrecognizedGroups.included", ), - helpGroups: "`/help groups`", + helpGroups: `${clickableSlashCommand( + "help", + )} action:groups`, unmatchedGroups: unmatchedGroups.join(", "), solution: i18n.translate( messageContext.guildID, "misc.failure.unrecognizedGroups.solution", { - command: "`/include add`", + command: clickableSlashCommand( + COMMAND_NAME, + GroupAction.ADD, + ), }, ), }, diff --git a/src/commands/game_options/remove.ts b/src/commands/game_options/remove.ts index 83db23b0d..3d470154c 100644 --- a/src/commands/game_options/remove.ts +++ b/src/commands/game_options/remove.ts @@ -1,5 +1,6 @@ import { EMBED_ERROR_COLOR, KmqImages } from "../../constants"; import { IPCLogger } from "../../logger"; +import { clickableSlashCommand } from "../../helpers/utils"; import { generateOptionsMessage, getDebugLogHeader, @@ -167,7 +168,9 @@ export default class RemoveCommand implements BaseCommand { messageContext.guildID, "command.remove.failure.unrecognizedGroups.removed", ), - helpGroups: "/help groups", + helpGroups: `${clickableSlashCommand( + "help", + )} action:groups`, unmatchedGroups: unmatchedGroups.join(", "), solution: "", }, diff --git a/src/commands/game_options/subunits.ts b/src/commands/game_options/subunits.ts index b16aaa3aa..60f9e95be 100644 --- a/src/commands/game_options/subunits.ts +++ b/src/commands/game_options/subunits.ts @@ -48,7 +48,7 @@ export default class SubunitsCommand implements BaseCommand { description: i18n.translate( guildID, "command.subunits.help.description", - { groups: "`/groups`" }, + { groups: clickableSlashCommand("groups") }, ), examples: [ { @@ -60,7 +60,7 @@ export default class SubunitsCommand implements BaseCommand { guildID, "command.subunits.help.example.include", { - groupCommand: "/groups", + groupCommand: clickableSlashCommand("groups"), parentGroup: "BTS", subunitOne: "J-Hope", subunitTwo: "RM", @@ -97,18 +97,6 @@ export default class SubunitsCommand implements BaseCommand { > => [ { name: COMMAND_NAME, - description: i18n.translate( - LocaleType.EN, - "command.subunits.help.description", - { groups: "`/groups`" }, - ), - descriptionLocalizations: { - [LocaleType.KO]: i18n.translate( - LocaleType.KO, - "command.subunits.help.description", - { groups: "`/groups`" }, - ), - }, type: Eris.Constants.ApplicationCommandTypes.CHAT_INPUT, options: [ { @@ -117,7 +105,7 @@ export default class SubunitsCommand implements BaseCommand { LocaleType.EN, "command.subunits.help.description", { - groups: "`/groups`", + groups: "/groups", }, ), description_localizations: Object.values(LocaleType) @@ -129,7 +117,7 @@ export default class SubunitsCommand implements BaseCommand { locale, "command.subunits.help.description", { - groups: "`/groups`", + groups: "/groups", }, ), }), diff --git a/src/helpers/discord_utils.ts b/src/helpers/discord_utils.ts index 2ebd3ea51..6c1a6a893 100644 --- a/src/helpers/discord_utils.ts +++ b/src/helpers/discord_utils.ts @@ -131,7 +131,7 @@ function missingPermissionsText( return i18n.translate(guildID, "misc.failure.missingPermissionsText", { missingPermissions: missingPermissions.join(", "), permissionsLink: PERMISSIONS_LINK, - helpCommand: "`/help`", + helpCommand: clickableSlashCommand("help"), }); } @@ -821,7 +821,7 @@ export async function generateOptionsMessage( description: i18n.translate( guildID, "misc.failure.retrievingSongData.description", - { helpCommand: "`/help`" }, + { helpCommand: clickableSlashCommand("help") }, ), }); return null; @@ -2229,7 +2229,11 @@ export async function notifyOptionsGenerationError( description: i18n.translate( messageContext.guildID, "misc.failure.optionsGeneration.description", - { resetCommand: "`/reset`", helpCommand: "`/help`", debugId }, + { + resetCommand: clickableSlashCommand("reset"), + helpCommand: clickableSlashCommand("help"), + debugId, + }, ), }); } diff --git a/src/helpers/validate.ts b/src/helpers/validate.ts index f057cd152..02644a979 100644 --- a/src/helpers/validate.ts +++ b/src/helpers/validate.ts @@ -1,5 +1,5 @@ import { IPCLogger } from "../logger"; -import { arrayToString } from "./utils"; +import { arrayToString, clickableSlashCommand } from "./utils"; import { getDebugLogHeader, sendErrorMessage } from "./discord_utils"; import MessageContext from "../structures/message_context"; import i18n from "./localization_manager"; @@ -65,7 +65,7 @@ export default ( message.guildID, "misc.failure.validation.numArguments.incorrect", { - help: "/help", + help: clickableSlashCommand("help"), command: parsedMessage.action, }, ), diff --git a/src/structures/session.ts b/src/structures/session.ts index 24813b716..47e8c51a0 100644 --- a/src/structures/session.ts +++ b/src/structures/session.ts @@ -8,6 +8,7 @@ import { getLocalizedSongName, } from "../helpers/game_utils"; import { + clickableSlashCommand, friendlyFormattedNumber, getMention, truncatedString, @@ -561,8 +562,8 @@ export default abstract class Session { "misc.gameOwnerChanged.description", { newGameOwner: getMention(this.owner.id), - forcehintCommand: "`/forcehint`", - forceskipCommand: "`/forceskip`", + forcehintCommand: clickableSlashCommand("forcehint"), + forceskipCommand: clickableSlashCommand("forceskip"), }, ), thumbnailUrl: KmqImages.LISTENING,