@bililive-tools/bilibili-recorder 1.19.2 → 1.19.3
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/lib/danma.js +5 -1
- package/package.json +3 -4
package/lib/danma.js
CHANGED
|
@@ -137,9 +137,13 @@ class DanmaClient extends EventEmitter {
|
|
|
137
137
|
this.emit("Message", gift);
|
|
138
138
|
},
|
|
139
139
|
onGift: (msg) => {
|
|
140
|
+
let timestamp = this.useServerTimestamp ? msg?.raw?.data?.timestamp * 1000 : Date.now();
|
|
141
|
+
if (msg.type === "SEND_GIFT_V2") {
|
|
142
|
+
timestamp = this.useServerTimestamp ? msg.timestamp : Date.now();
|
|
143
|
+
}
|
|
140
144
|
const gift = {
|
|
141
145
|
type: "give_gift",
|
|
142
|
-
timestamp:
|
|
146
|
+
timestamp: timestamp,
|
|
143
147
|
name: msg.body.gift_name,
|
|
144
148
|
count: msg.body.amount,
|
|
145
149
|
price: msg.body.coin_type === "silver" ? 0 : msg.body.price / 1000,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bililive-tools/bilibili-recorder",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.3",
|
|
4
4
|
"description": "bililive-tools bilibili recorder implemention",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -34,12 +34,11 @@
|
|
|
34
34
|
"author": "renmu123",
|
|
35
35
|
"license": "LGPL",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"blive-message-listener": "
|
|
37
|
+
"blive-message-listener": "0.5.6-beta.1",
|
|
38
38
|
"mitt": "^3.0.1",
|
|
39
|
-
"tiny-bilibili-ws": "^1.0.2",
|
|
40
39
|
"lodash-es": "^4.17.21",
|
|
41
40
|
"axios": "^1.15.0",
|
|
42
|
-
"@bililive-tools/manager": "^1.17.
|
|
41
|
+
"@bililive-tools/manager": "^1.17.3"
|
|
43
42
|
},
|
|
44
43
|
"scripts": {
|
|
45
44
|
"build": "tsc",
|