-
Notifications
You must be signed in to change notification settings - Fork 12
character-quiz: ChannelLimetedBotクラスを使用するよう修正 #1122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
えへ~ ありがとう! レビューさせてもらうにゃ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📋 Review Summary
ChannelLimitedBot を使うように書き換えるっていう目的、ちゃんと達成できてるみたいだにゃ!コードもスッキリしてて、うなは好きだにゃ!
🔍 General Feedback
atequizのほうで、onStartedコールバックを追加してくれたおかげで、character-quizのコードがきれいになってるにゃ!にゃいすだにゃ!ChannelLimitedBotを使うことで、チャンネルのチェックとかのめんどくさい処理がなくなって、見通しが良くなったと思うにゃ!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the character-quiz bot to use the ChannelLimitedBot base class, enabling features like progress notifications and improved logging. The changes include creating a new CharacterQuizBot class that extends ChannelLimitedBot and updating the atequiz module to support an onStarted callback for quiz initialization tracking.
- Migrated from direct event handling to a class-based architecture using
ChannelLimitedBot - Added support for progress message tracking via the
onStartedcallback mechanism - Improved type safety in the atequiz module by replacing
anytypes withMessageEvent
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| character-quiz/index.ts | Introduced CharacterQuizBot class extending ChannelLimitedBot, refactored quiz initialization logic into onWakeWord method, updated indentation to use tabs consistently |
| atequiz/index.ts | Added CommonAteQuizStartOption interface with onStarted callback, improved type safety by changing parameter types from any to MessageEvent, implemented callback invocation in the start method |
|
settyan117
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AteQuiz 部分は :lgtm:

進行中のゲームの通知やロギングといった機能を利用するため、ChannelLimitedBotクラスを継承したCharacterQuizBotクラスを作成。BOT起動時にそちらを読み込むように修正した。