feat(discord-bot): 応答メッセージを日本語化しクエスト名をタイトルで表示 - #559
Merged
Conversation
ユーザーに見えるメッセージを全て日本語にした。対象は各コマンドの ephemeral / followup、Discord UI に出るコマンド説明 (payload.ts)、 インストール時にブラウザへ返す HTTP レスポンス。Discord API 向けの レスポンスと運用ログは英語のまま据え置き。 あわせて questChoiceLabel をタイトルのみに変更し、完了報告の確認 メッセージも `Quest #12` ではなくクエスト名を出すようにした。 タイトル取得はメンバーシップ/モジュール解決のチェックを通過した後に 開始してトランザクションと並行させ、失敗パスで無駄なサブグラフ リクエストを出さない。await より前に .catch を付けているので サブグラフ障害時は ID 表示にフォールバックするだけで、送信自体は 失敗しない。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
@toban/discord-botのユーザーに見えるメッセージを全て日本語にしました。あわせて、クエスト完了報告の確認メッセージがQuest #12ではなくクエスト名を表示するようにしています。日本語化の対象
thx/balance/quest submit/toban-link/toban-setup)commands/payload.ts)api/install/{start,callback}.ts)Discord API 向けのレスポンス(
invalid signature等、人間の目に触れない)とconsole.errorの運用ログは英語のまま据え置いています。クエスト名の表示
questChoiceLabelを「タイトルのみ」に変更しました(以前はタイトル (#42))。タイトルが未取得のときだけクエスト #42にフォールバックします。オートコンプリートの候補と完了報告の確認メッセージが同じ関数を使うため、選んだときと確認されたときで表示が一致します。executeQuestSubmitInnerにタイトル取得を追加していますが、配置に以下の配慮をしています:await→ 追加のレイテンシがゼロawaitより前に.catch()を付与 → unhandled rejection にならず、サブグラフ障害時は ID 表示にフォールバックするだけで送信自体は失敗しない(タイトルは表示専用のため)テスト
test/quest-submit.test.ts7 箇所、test/thx.test.ts4 箇所のアサーションを新文言に追随させました。pnpm --filter @toban/discord-bot test— 44 passedpnpm --filter @toban/discord-bot typecheck— passなお
/quest submitの成功パスは元から実行テストがありません(executeQuestSubmitが内部で walletClient を組み立てるため、test/thx.test.tsにあるような RPC スタブ一式が必要)。そのためタイトル表示部分は typecheck とレビューでの確認のみです。デプロイ時の注意
payload.tsのコマンド説明を変更したため、既存ギルドではコマンドの再登録が必要です(新規インストールはapi/install/callback.tsが自動登録します):コントラクト / サブグラフ / Turnkey policy への影響はありません。
🤖 Generated with Claude Code