woodenfish-bot 3.6.9 → 3.7.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.
Files changed (3) hide show
  1. package/es/index.js +20 -3
  2. package/lib/index.js +20 -3
  3. package/package.json +11 -11
package/es/index.js CHANGED
@@ -733,7 +733,7 @@ function requireRegenerator () {
733
733
  var regeneratorExports = requireRegenerator();
734
734
  var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regeneratorExports);
735
735
 
736
- var version = "3.6.9";
736
+ var version = "3.7.1";
737
737
 
738
738
  var loglevel$1 = {exports: {}};
739
739
 
@@ -2497,13 +2497,20 @@ function _inherits(t, e) {
2497
2497
  // 心跳参数
2498
2498
  var OpCode = /*#__PURE__*/function (OpCode) {
2499
2499
  OpCode[OpCode["DISPATCH"] = 0] = "DISPATCH";
2500
+ // 服务端进行消息推送
2500
2501
  OpCode[OpCode["HEARTBEAT"] = 1] = "HEARTBEAT";
2502
+ // 客户端发送心跳
2501
2503
  OpCode[OpCode["IDENTIFY"] = 2] = "IDENTIFY";
2504
+ // 鉴权
2502
2505
  OpCode[OpCode["RESUME"] = 6] = "RESUME";
2506
+ // 恢复连接
2503
2507
  OpCode[OpCode["RECONNECT"] = 7] = "RECONNECT";
2508
+ // 服务端通知客户端重连
2504
2509
  OpCode[OpCode["INVALID_SESSION"] = 9] = "INVALID_SESSION";
2510
+ // 当identify或resume的时候,如果参数有错,服务端会返回该消息
2505
2511
  OpCode[OpCode["HELLO"] = 10] = "HELLO";
2506
- OpCode[OpCode["HEARTBEAT_ACK"] = 11] = "HEARTBEAT_ACK";
2512
+ // 当客户端与网关建立ws连接之后,网关下发的第一条消息
2513
+ OpCode[OpCode["HEARTBEAT_ACK"] = 11] = "HEARTBEAT_ACK"; // 当发送心跳成功之后,就会收到该消息
2507
2514
  return OpCode;
2508
2515
  }({});
2509
2516
 
@@ -2666,16 +2673,26 @@ var WSCodes = {
2666
2673
  // websocket错误码
2667
2674
  var WebsocketCode = /*#__PURE__*/function (WebsocketCode) {
2668
2675
  WebsocketCode[WebsocketCode["INVALID_OPCODE"] = 4001] = "INVALID_OPCODE";
2676
+ // 无效的opcode
2669
2677
  WebsocketCode[WebsocketCode["INVALID_PAYLOAD"] = 4002] = "INVALID_PAYLOAD";
2678
+ // 无效的payload
2670
2679
  WebsocketCode[WebsocketCode["ERROR_SEQ"] = 4007] = "ERROR_SEQ";
2680
+ // seq错误
2671
2681
  WebsocketCode[WebsocketCode["TOO_FAST_PAYLOAD"] = 4008] = "TOO_FAST_PAYLOAD";
2682
+ // 发送 payload 过快,请重新连接,并遵守连接后返回的频控信息
2672
2683
  WebsocketCode[WebsocketCode["EXPIRED"] = 4009] = "EXPIRED";
2684
+ // 连接过期,请重连
2673
2685
  WebsocketCode[WebsocketCode["INVALID_SHARD"] = 4010] = "INVALID_SHARD";
2686
+ // 无效的shard
2674
2687
  WebsocketCode[WebsocketCode["TOO_MACH_GUILD"] = 4011] = "TOO_MACH_GUILD";
2688
+ // 连接需要处理的guild过多,请进行合理分片
2675
2689
  WebsocketCode[WebsocketCode["INVALID_VERSION"] = 4012] = "INVALID_VERSION";
2690
+ // 无效的version
2676
2691
  WebsocketCode[WebsocketCode["INVALID_INTENTS"] = 4013] = "INVALID_INTENTS";
2692
+ // 无效的intent
2677
2693
  WebsocketCode[WebsocketCode["DISALLOWED_INTENTS"] = 4014] = "DISALLOWED_INTENTS";
2678
- WebsocketCode[WebsocketCode["ERROR"] = 4900] = "ERROR";
2694
+ // intent无权限
2695
+ WebsocketCode[WebsocketCode["ERROR"] = 4900] = "ERROR"; // 内部错误,请重连
2679
2696
  return WebsocketCode;
2680
2697
  }({});
2681
2698
 
package/lib/index.js CHANGED
@@ -735,7 +735,7 @@ function requireRegenerator () {
735
735
  var regeneratorExports = requireRegenerator();
736
736
  var _regeneratorRuntime = /*@__PURE__*/getDefaultExportFromCjs(regeneratorExports);
737
737
 
738
- var version = "3.6.9";
738
+ var version = "3.7.1";
739
739
 
740
740
  var loglevel$1 = {exports: {}};
741
741
 
@@ -2499,13 +2499,20 @@ function _inherits(t, e) {
2499
2499
  // 心跳参数
2500
2500
  var OpCode = /*#__PURE__*/function (OpCode) {
2501
2501
  OpCode[OpCode["DISPATCH"] = 0] = "DISPATCH";
2502
+ // 服务端进行消息推送
2502
2503
  OpCode[OpCode["HEARTBEAT"] = 1] = "HEARTBEAT";
2504
+ // 客户端发送心跳
2503
2505
  OpCode[OpCode["IDENTIFY"] = 2] = "IDENTIFY";
2506
+ // 鉴权
2504
2507
  OpCode[OpCode["RESUME"] = 6] = "RESUME";
2508
+ // 恢复连接
2505
2509
  OpCode[OpCode["RECONNECT"] = 7] = "RECONNECT";
2510
+ // 服务端通知客户端重连
2506
2511
  OpCode[OpCode["INVALID_SESSION"] = 9] = "INVALID_SESSION";
2512
+ // 当identify或resume的时候,如果参数有错,服务端会返回该消息
2507
2513
  OpCode[OpCode["HELLO"] = 10] = "HELLO";
2508
- OpCode[OpCode["HEARTBEAT_ACK"] = 11] = "HEARTBEAT_ACK";
2514
+ // 当客户端与网关建立ws连接之后,网关下发的第一条消息
2515
+ OpCode[OpCode["HEARTBEAT_ACK"] = 11] = "HEARTBEAT_ACK"; // 当发送心跳成功之后,就会收到该消息
2509
2516
  return OpCode;
2510
2517
  }({});
2511
2518
 
@@ -2668,16 +2675,26 @@ var WSCodes = {
2668
2675
  // websocket错误码
2669
2676
  var WebsocketCode = /*#__PURE__*/function (WebsocketCode) {
2670
2677
  WebsocketCode[WebsocketCode["INVALID_OPCODE"] = 4001] = "INVALID_OPCODE";
2678
+ // 无效的opcode
2671
2679
  WebsocketCode[WebsocketCode["INVALID_PAYLOAD"] = 4002] = "INVALID_PAYLOAD";
2680
+ // 无效的payload
2672
2681
  WebsocketCode[WebsocketCode["ERROR_SEQ"] = 4007] = "ERROR_SEQ";
2682
+ // seq错误
2673
2683
  WebsocketCode[WebsocketCode["TOO_FAST_PAYLOAD"] = 4008] = "TOO_FAST_PAYLOAD";
2684
+ // 发送 payload 过快,请重新连接,并遵守连接后返回的频控信息
2674
2685
  WebsocketCode[WebsocketCode["EXPIRED"] = 4009] = "EXPIRED";
2686
+ // 连接过期,请重连
2675
2687
  WebsocketCode[WebsocketCode["INVALID_SHARD"] = 4010] = "INVALID_SHARD";
2688
+ // 无效的shard
2676
2689
  WebsocketCode[WebsocketCode["TOO_MACH_GUILD"] = 4011] = "TOO_MACH_GUILD";
2690
+ // 连接需要处理的guild过多,请进行合理分片
2677
2691
  WebsocketCode[WebsocketCode["INVALID_VERSION"] = 4012] = "INVALID_VERSION";
2692
+ // 无效的version
2678
2693
  WebsocketCode[WebsocketCode["INVALID_INTENTS"] = 4013] = "INVALID_INTENTS";
2694
+ // 无效的intent
2679
2695
  WebsocketCode[WebsocketCode["DISALLOWED_INTENTS"] = 4014] = "DISALLOWED_INTENTS";
2680
- WebsocketCode[WebsocketCode["ERROR"] = 4900] = "ERROR";
2696
+ // intent无权限
2697
+ WebsocketCode[WebsocketCode["ERROR"] = 4900] = "ERROR"; // 内部错误,请重连
2681
2698
  return WebsocketCode;
2682
2699
  }({});
2683
2700
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "woodenfish-bot",
3
- "version": "3.6.9",
3
+ "version": "3.7.1",
4
4
  "description": "woodenfish-bot",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -31,14 +31,14 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@babel/core": "^7.26.10",
34
- "@babel/generator": "^7.26.10",
35
- "@babel/parser": "^7.26.10",
34
+ "@babel/generator": "^7.27.0",
35
+ "@babel/parser": "^7.27.0",
36
36
  "@babel/plugin-transform-class-properties": "^7.25.9",
37
37
  "@babel/plugin-transform-runtime": "^7.26.10",
38
38
  "@babel/preset-env": "^7.26.9",
39
- "@babel/preset-typescript": "^7.26.0",
40
- "@babel/traverse": "^7.26.10",
41
- "@babel/types": "^7.26.10",
39
+ "@babel/preset-typescript": "^7.27.0",
40
+ "@babel/traverse": "^7.27.0",
41
+ "@babel/types": "^7.27.0",
42
42
  "@commitlint/cli": "^19.8.0",
43
43
  "@commitlint/config-conventional": "^19.8.0",
44
44
  "@rollup/plugin-babel": "^6.0.4",
@@ -48,10 +48,10 @@
48
48
  "@rollup/plugin-replace": "^6.0.2",
49
49
  "@types/jest": "^29.5.14",
50
50
  "@types/lodash.assignin": "^4.2.9",
51
- "@types/node": "^22.13.11",
51
+ "@types/node": "^22.13.13",
52
52
  "@types/ws": "^8.18.0",
53
- "@typescript-eslint/eslint-plugin": "^8.27.0",
54
- "@typescript-eslint/parser": "^8.27.0",
53
+ "@typescript-eslint/eslint-plugin": "^8.28.0",
54
+ "@typescript-eslint/parser": "^8.28.0",
55
55
  "chalk": "^5.4.1",
56
56
  "commitizen": "^4.3.1",
57
57
  "cross-env": "^7.0.3",
@@ -60,7 +60,7 @@
60
60
  "eslint-config-alloy": "^5.1.2",
61
61
  "eslint-config-prettier": "^10.1.1",
62
62
  "eslint-plugin-jest": "^28.11.0",
63
- "eslint-plugin-prettier": "^5.2.3",
63
+ "eslint-plugin-prettier": "^5.2.5",
64
64
  "handlebars": "^4.7.8",
65
65
  "inquirer": "^12.5.0",
66
66
  "jest": "^29.7.0",
@@ -69,7 +69,7 @@
69
69
  "prettier": "^3.5.3",
70
70
  "readline-sync": "^1.4.10",
71
71
  "rimraf": "^6.0.1",
72
- "rollup": "^4.36.0",
72
+ "rollup": "^4.37.0",
73
73
  "rollup-plugin-dts": "^6.2.1",
74
74
  "rollup-plugin-typescript-paths": "^1.5.0",
75
75
  "standard-version": "^9.5.0",