-
Notifications
You must be signed in to change notification settings - Fork 14
/
sendShake.js
78 lines (73 loc) · 1.5 KB
/
sendShake.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
const { core } = require("oicq")
const crypto = require('crypto');
//type 1为私聊 0为群聊
//size是大小最大是3
//啊发现oicq有可以这样发[{"type":"shake","id":1,"text":"戳一戳"}]
//嗯新的发现,大于1999也就是2000就变成超级会员表情了,然后结构发生了变化,oicq发不出来
//下面免会员可发会员戳戳
async function sendShake(recipient, id, size = 3, type = 0) {
let body = {
"1": {},
"2": {
"1": 0,
"2": 0,
"3": 0
},
"3": {
"1": {
"2": [
{
"53": {
"1": 2,
"2": {
"1": 1,
"3": 0,
"4": 1,
"5": "",
"6": "7.2.0",
"7": parseInt(size),
"10": 0
},
"3": 1
}
},
{
"1": {
"1": "[刷RNB系统]请使用最新版手机QQ体验新功能。"
}
},
{
"17": {
"1": 0
}
},
{
"37": {
"17": 21908,
"19": {
"15": 65536,
"31": 0,
"41": 0
}
}
}
]
}
},
"4": crypto.randomBytes(2).readUInt16BE(),
"5": crypto.randomBytes(4).readUInt16BE(),
"8": 0
};
if (id > 1999) {
body[3][1][2][0][53][2][1] = 126
body[3][1][2][0][53][2][4] = id
body[3][1][2][0][53][3] = 126
} else {
body[3][1][2][0][53][2][1] = id
body[3][1][2][0][53][2][4] = 1
body[3][1][2][0][53][3] = id
}
type ? body[1][1] = { "1": recipient } : body[1][2] = { "1": recipient }
body = core.pb.encode(body)
await bot.sendUni("MessageSvc.PbSendMsg", body);
}