-
Notifications
You must be signed in to change notification settings - Fork 346
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
Fix the docs to use WechatyBuilder to instantiate the Wechaty instance #1532
Conversation
WalkthroughThe change introduces a significant transformation in managing bot instances by transitioning from the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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 Status
Actionable comments generated: 3
Configuration used: CodeRabbit UI
Files selected for processing (1)
- docusaurus/docs/getting-started/running-locally.mdx (2 hunks)
Additional comments: 1
docusaurus/docs/getting-started/running-locally.mdx (1)
- 290-296: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [286-293]
There are extra spaces in the import statements, which could be cleaned up for better readability. Additionally, consider organizing imports in a consistent order, such as external libraries followed by internal modules.
-import { - Contact, - Message, - ScanStatus, - WechatyBuilder, - log, -}from 'wechaty' +import { Contact, Message, ScanStatus, WechatyBuilder, log } from 'wechaty'
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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 Status
Actionable comments generated: 1
Configuration used: CodeRabbit UI
Files selected for processing (1)
- docusaurus/docs/getting-started/running-locally.mdx (2 hunks)
Additional comments: 1
docusaurus/docs/getting-started/running-locally.mdx (1)
- 293-293: The import statement correctly reflects the transition from
Wechaty
toWechatyBuilder
, aligning with the PR's objective to update the documentation according to the latest practices of the Wechaty framework.
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 Status
Actionable comments generated: 2
Configuration used: CodeRabbit UI
Files selected for processing (1)
- docusaurus/docs/getting-started/running-locally.mdx (3 hunks)
Additional comments: 2
docusaurus/docs/getting-started/running-locally.mdx (2)
- 293-293: The import statement for
WechatyBuilder
correctly aligns with the PR's objective to update the documentation for usingWechatyBuilder
instead ofWechaty
. However, it's important to ensure that all references and examples in the documentation consistently useWechatyBuilder
.- 364-367: The instantiation of
WechatyBuilder
and the bot's start process are correctly updated according to the PR's objectives. However, the error handling for the bot's start process is already mentioned in the comments from previous reviews, emphasizing its importance for gracefully managing potential startup errors.
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.
Thanks for the contribution!
please remove the unnecessary changes as I commented, and then this PR will be good to be merged!
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 Status
Actionable comments generated: 2
Configuration used: CodeRabbit UI
Files ignored due to path filters (1)
package.json
is excluded by:!**/*.json
Files selected for processing (1)
- docusaurus/docs/getting-started/running-locally.mdx (3 hunks)
Additional comments: 2
docusaurus/docs/getting-started/running-locally.mdx (2)
- 293-293: The transition from
Wechaty
toWechatyBuilder
for creating the Wechaty instance is correctly implemented in the import statement. This aligns with the PR's objective to modernize the documentation.- 364-371: > 📝 NOTE
This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [367-386]
The instantiation of the
WechatyBuilder
is correct and aligns with the PR's objective. However, it's a good practice to add error handling for the bot's start process to gracefully handle potential startup errors.bot.start() .then(() => log.info('StarterBot', 'Starter Bot Started.')) + .catch(e => log.error('StarterBot', 'Failed to start the bot:', e))
I've removed the unnecessary changes. Please review it again! Thank you! |
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.
LGTM
Thank you very much for your contribution! You are welcome to join Wechaty Contributor Program1. Join Wechaty Organization
I have invited you to join our Wechaty GitHub Organization; please accept it by following the above message. (See also: wechaty/PMC#16) 2. Update Your Wechaty Contributor Profile
3. Join the Wechaty Official Community on DiscordMake sure you have joined Discord! Join now if you are not: https://discord.gg/7q8NBZbQzt 4. Join The Contributor-Only WeChat RoomWe also have a WeChat room for contributors who can discuss Wechaty at a deeper level; you are welcome to join if interested. Please add @lijiarui wechat: ruirui_0914 and send her this PR link. She will invite you into the Wechaty Contributor Room. Cheers! |
Summary by CodeRabbit
Wechaty
class toWechatyBuilder
for bot instance initialization.