rmtrollbot 1.1.2 → 2.0.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 +4 -1
- package/index.mts +1 -48
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -33,7 +33,10 @@ It also has anti-colorcrash
|
|
|
33
33
|
```ts
|
|
34
34
|
bot.changeColor("#272822") // NICE TRY!!
|
|
35
35
|
```
|
|
36
|
+
## New for v2.0.0!
|
|
37
|
+
All types are now moved to [rmtrollbot-types](https://www.npmjs.com/package/rmtrollbot-types).
|
|
36
38
|
# Extensions
|
|
37
|
-
[rmtrollbot-decode](https://www.npmjs.com/package/rmtrollbot-decode?activeTab=readme): Decoder for rmtrollbot
|
|
39
|
+
[rmtrollbot-decode](https://www.npmjs.com/package/rmtrollbot-decode?activeTab=readme): Decoder for rmtrollbot<br>
|
|
40
|
+
[rmtrollbot-ping](https://www.npmjs.com/package/rmtrollbot-ping): Ping example
|
|
38
41
|
# Bots using this package
|
|
39
42
|
None have been recorded, but please use this package
|
package/index.mts
CHANGED
|
@@ -1,53 +1,6 @@
|
|
|
1
1
|
import { io } from "socket.io-client";
|
|
2
2
|
// import { Decoder } from "rmtrollbot-decode"
|
|
3
|
-
|
|
4
|
-
export type message = {
|
|
5
|
-
nick: string; // This is not shown in the RMTrollbox Manual, but does exist
|
|
6
|
-
sid: string;
|
|
7
|
-
bot: boolean;
|
|
8
|
-
// style is unused
|
|
9
|
-
date: number;
|
|
10
|
-
color: string;
|
|
11
|
-
home: string;
|
|
12
|
-
msg: string;
|
|
13
|
-
id: string;
|
|
14
|
-
channel: string;
|
|
15
|
-
system: boolean;
|
|
16
|
-
own: boolean;
|
|
17
|
-
reply: boolean;
|
|
18
|
-
for?: string;
|
|
19
|
-
files?: {
|
|
20
|
-
url: string;
|
|
21
|
-
mime: string;
|
|
22
|
-
name: string;
|
|
23
|
-
spoiler: boolean;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type user = {
|
|
28
|
-
sid: string;
|
|
29
|
-
nick: string;
|
|
30
|
-
color: string;
|
|
31
|
-
home: string;
|
|
32
|
-
bot: boolean;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export type userchangenick = {
|
|
36
|
-
nick: string;
|
|
37
|
-
color: string;
|
|
38
|
-
home: string;
|
|
39
|
-
date: number;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export type userupdate = {
|
|
43
|
-
nick: string;
|
|
44
|
-
home: string;
|
|
45
|
-
color: string;
|
|
46
|
-
status: "online" | "dnd" | "afk";
|
|
47
|
-
customst: string | false;
|
|
48
|
-
// style is unused
|
|
49
|
-
bot: boolean;
|
|
50
|
-
}
|
|
3
|
+
import { message, user, userchangenick, userupdate } from "rmtrollbot-types"
|
|
51
4
|
|
|
52
5
|
export class TrollBot {
|
|
53
6
|
// protected ext: Decoder | undefined; // DEPRECATED
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rmtrollbot",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "A package making the producing of rmtrollbox bots easier.",
|
|
5
5
|
"main": "index.mts",
|
|
6
6
|
"scripts": {
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"type": "commonjs",
|
|
19
19
|
"dependencies": {
|
|
20
|
+
"rmtrollbot-types": "^1.0.0",
|
|
20
21
|
"socket.io-client": "^4.8.3"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|