Skip to content

Commit

Permalink
Merge branch 'main' into aherman3-api_docs_add_zh
Browse files Browse the repository at this point in the history
  • Loading branch information
lijiarui authored Mar 25, 2024
2 parents 9ad74ee + c97fbc0 commit 6d22588
Showing 1 changed file with 4 additions and 4 deletions.
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'

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({
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

0 comments on commit 6d22588

Please sign in to comment.