rmtrollbot 1.0.3 → 1.1.0
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 +11 -0
- package/index.mts +16 -0
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -22,5 +22,16 @@ bot.onUserUpdate((data)=>{
|
|
|
22
22
|
console.log("user list updated!")
|
|
23
23
|
})
|
|
24
24
|
```
|
|
25
|
+
## New for v1.1.0!
|
|
26
|
+
You can now change the bot's name, and color!
|
|
27
|
+
```ts
|
|
28
|
+
bot.changeName("i clanker")
|
|
29
|
+
bot.changeColor("black")
|
|
30
|
+
bot.changeBack()
|
|
31
|
+
```
|
|
32
|
+
It also has anti-colorcrash
|
|
33
|
+
```ts
|
|
34
|
+
bot.changeColor("#272822") // NICE TRY!!
|
|
35
|
+
```
|
|
25
36
|
# Bots using this package
|
|
26
37
|
None have been recorded, but please use this package
|
package/index.mts
CHANGED
|
@@ -82,4 +82,20 @@ export class TrollBot {
|
|
|
82
82
|
disconnect() {
|
|
83
83
|
this.socket.disconnect()
|
|
84
84
|
}
|
|
85
|
+
changeNick(newn: string) {
|
|
86
|
+
this.name = newn
|
|
87
|
+
this.socket.emit("user joined", this.name, this.color, "bot", "")
|
|
88
|
+
}
|
|
89
|
+
changeColor(newc: string) {
|
|
90
|
+
if (!newc.includes("272822")) {
|
|
91
|
+
this.color = newc
|
|
92
|
+
this.socket.emit("user joined", this.name, this.color, "bot", "")
|
|
93
|
+
} else {
|
|
94
|
+
this.socket.send("NICE TRY!!")
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
changeBack() {
|
|
98
|
+
[this.name, this.color] = [this.ogcolor, this.ogname]
|
|
99
|
+
this.socket.emit("user joined", this.name, this.color, "bot", "")
|
|
100
|
+
}
|
|
85
101
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rmtrollbot",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "A package making the producing of rmtrollbox bots easier.",
|
|
5
5
|
"main": "index.mts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
8
|
},
|
|
9
|
-
"keywords": [
|
|
9
|
+
"keywords": [
|
|
10
|
+
"bot",
|
|
11
|
+
"chat",
|
|
12
|
+
"trollbox",
|
|
13
|
+
"rmtrollbot",
|
|
14
|
+
"trollbot"
|
|
15
|
+
],
|
|
10
16
|
"author": "",
|
|
11
17
|
"license": "MIT",
|
|
12
18
|
"type": "commonjs",
|