Skip to content

Commit da0a049

Browse files
authored
Update README (#94)
1 parent c534bda commit da0a049

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
[![Build Status](https://github.com/Pandapip1/mineflayer-swarm/workflows/CI/badge.svg)](https://github.com/Pandapip1/mineflayer-swarm/actions?query=workflow%3A%22CI%22)
44
[![Try it on gitpod](https://img.shields.io/badge/try-on%20gitpod-brightgreen.svg)](https://gitpod.io/#https://github.com/Pandapip1/mineflayer-swarm)
55

6-
Allows you to control an entire [mineflayer](https://github.com/PrismarineJS/mineflayer) bot swarm with minimal additional code. The API isn't final, so minor versions might introduce breaking changes. Here be dragons!
6+
Allows you to control an entire [`mineflayer`](https://github.com/PrismarineJS/mineflayer) bot swarm with minimal additional code. The API isn't final, so minor versions might introduce breaking changes. Here be dragons!
77

88
## Moving from a single bot to a swarm
99

1010
It's easier than you'd think!
1111

12-
Example bot using mineflayer:
12+
Example bot using `mineflayer`:
1313

1414
```ts
1515
import { createBot, Bot } from 'mineflayer'
@@ -21,23 +21,23 @@ const bot: Bot = createBot({
2121
port: 25565
2222
})
2323

24-
bot.on('chat', (username, message) => {
24+
bot.on('chat', function (username, message) {
2525
if (username === bot.username) return
2626
bot.chat(message)
2727
})
2828
```
2929

30-
Example bot using mineflayer-swarm:
30+
Example bot using `mineflayer-swarm`:
3131

3232
```ts
3333
import { createSwarm, Swarm } from 'mineflayer'
3434

35-
const swarm: Swarm = mineflayerSwarm.createSwarm(require('auth.json'), {
35+
const swarm: Swarm = mineflayerSwarm.createSwarm({
3636
host: 'localhost',
3737
port: 25565
38-
})
38+
}, require('auth.json'))
3939

40-
swarm.on('chat', (bot, username, message) => {
40+
swarm.on('chat', function (bot, username, message) {
4141
if (swarm.isSwarmMember(username)) return
4242
bot.chat(message)
4343
})

0 commit comments

Comments
 (0)