rmtrollbot 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3,4 +3,24 @@ A package making the producing of rmtrollbox bots easier.<br>
|
|
|
3
3
|
To start a bot, you must start a new TrollBot element
|
|
4
4
|
```ts
|
|
5
5
|
let bot = new Bot("clanker", "gray")
|
|
6
|
-
```
|
|
6
|
+
```
|
|
7
|
+
You can recieve messages using `onMessage`
|
|
8
|
+
```ts
|
|
9
|
+
bot.onMessage((data)=>{
|
|
10
|
+
bot.send("aw hell nah i'm out of here")
|
|
11
|
+
bot.disconnect()
|
|
12
|
+
})
|
|
13
|
+
```
|
|
14
|
+
You can see how people leave and join using `onUser`
|
|
15
|
+
```ts
|
|
16
|
+
bot.onUser("join", ...)
|
|
17
|
+
bot.onUser("leave", ...)
|
|
18
|
+
```
|
|
19
|
+
You can also update your user list by using `onUserUpdate`
|
|
20
|
+
```ts
|
|
21
|
+
bot.onUserUpdate((data)=>{
|
|
22
|
+
console.log("user list updated!")
|
|
23
|
+
})
|
|
24
|
+
```
|
|
25
|
+
# Bots using this package
|
|
26
|
+
None have been recorded, but please use this package
|