Skip to content
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

Merged
merged 10 commits into from
Mar 15, 2024
8 changes: 4 additions & 4 deletions docusaurus/docs/getting-started/running-locally.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ import {
Contact,
Message,
ScanStatus,
Wechaty,
WechatyBuilder,
log,
}from 'wechaty'

leotaozeng marked this conversation as resolved.
Show resolved Hide resolved
leotaozeng marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -364,8 +364,8 @@ async function onMessage (msg: Message) {
Now initializing the bot by providing a name.

```ts
const bot = new Wechaty({
name: 'ding-dong-bot',
const bot = WechatyBuilder.build({
leotaozeng marked this conversation as resolved.
Show resolved Hide resolved
name: 'ding-dong-bot'
})
```

Expand All @@ -383,7 +383,7 @@ Finally for starting the bot
```ts
bot.start()
.then(() => log.info('StarterBot', 'Starter Bot Started.'))
.catch(e => log.error('StarterBot', e))
.catch(e => log.error('StarterBot', 'Failed to start the bot:', e))
```

## Running the bot
Expand Down
Loading