mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
build: poke能用25493
This commit is contained in:
parent
14196fd349
commit
9a6a1798d0
@ -453,7 +453,7 @@ export class OB11Constructor {
|
|||||||
let pokedetail: any[] = json.items;
|
let pokedetail: any[] = json.items;
|
||||||
//筛选item带有uid的元素
|
//筛选item带有uid的元素
|
||||||
pokedetail = pokedetail.filter(item => item.uid);
|
pokedetail = pokedetail.filter(item => item.uid);
|
||||||
console.log("[NapCat] 群拍一拍 群:", pokedetail, parseInt(msg.peerUid), " ", await NTQQUserApi.getUinByUid(pokedetail[0].uid), "拍了拍", await NTQQUserApi.getUinByUid(pokedetail[1].uid));
|
//console.log("[NapCat] 群拍一拍 群:", pokedetail, parseInt(msg.peerUid), " ", await NTQQUserApi.getUinByUid(pokedetail[0].uid), "拍了拍", await NTQQUserApi.getUinByUid(pokedetail[1].uid));
|
||||||
if (pokedetail.length == 2) {
|
if (pokedetail.length == 2) {
|
||||||
return new OB11GroupPokeEvent(parseInt(msg.peerUid), parseInt((await NTQQUserApi.getUinByUid(pokedetail[0].uid))!), parseInt((await NTQQUserApi.getUinByUid(pokedetail[1].uid))!));
|
return new OB11GroupPokeEvent(parseInt(msg.peerUid), parseInt((await NTQQUserApi.getUinByUid(pokedetail[0].uid))!), parseInt((await NTQQUserApi.getUinByUid(pokedetail[1].uid))!));
|
||||||
}
|
}
|
||||||
|
@ -116,6 +116,7 @@ export class NapCatOnebot11 {
|
|||||||
try {
|
try {
|
||||||
// 生产环境会自己去掉
|
// 生产环境会自己去掉
|
||||||
const hex = buf2hex(Buffer.from(protobufData));
|
const hex = buf2hex(Buffer.from(protobufData));
|
||||||
|
//console.log(hex);
|
||||||
const sysMsg = SysData.fromBinary(Buffer.from(protobufData));
|
const sysMsg = SysData.fromBinary(Buffer.from(protobufData));
|
||||||
const peeruin = sysMsg.header[0].peerNumber;
|
const peeruin = sysMsg.header[0].peerNumber;
|
||||||
const peeruid = sysMsg.header[0].peerString;
|
const peeruid = sysMsg.header[0].peerString;
|
||||||
@ -124,18 +125,18 @@ export class NapCatOnebot11 {
|
|||||||
const subType1 = sysMsg.body[0].subType1;
|
const subType1 = sysMsg.body[0].subType1;
|
||||||
let pokeEvent: OB11FriendPokeEvent | OB11GroupPokeEvent;
|
let pokeEvent: OB11FriendPokeEvent | OB11GroupPokeEvent;
|
||||||
//console.log(peeruid);
|
//console.log(peeruid);
|
||||||
// if (MsgType == 528 && subType0 == 290 && hex.length < 250 && hex.endsWith('04')) {
|
if (MsgType == 528 && subType0 == 290 && hex.length < 250 && hex.endsWith('04')) {
|
||||||
// // 防止上报两次 私聊戳一戳
|
// 防止上报两次 私聊戳一戳
|
||||||
// if (PokeCache.has(peeruid)) {
|
if (PokeCache.has(peeruid)) {
|
||||||
// log('[私聊] 用户 ', peeruin, ' 对你戳一戳');
|
//log('[私聊] 用户 ', peeruin, ' 对你戳一戳');
|
||||||
// pokeEvent = new OB11FriendPokeEvent(peeruin);
|
pokeEvent = new OB11FriendPokeEvent(parseInt(selfInfo.uin), peeruin);
|
||||||
// postOB11Event(pokeEvent);
|
postOB11Event(pokeEvent);
|
||||||
// }
|
}
|
||||||
// PokeCache.set(peeruid, false);
|
PokeCache.set(peeruid, false);
|
||||||
// setTimeout(() => {
|
setTimeout(() => {
|
||||||
// PokeCache.delete(peeruid);
|
PokeCache.delete(peeruid);
|
||||||
// }, 1000);
|
}, 1000);
|
||||||
// }
|
}
|
||||||
// if (MsgType == 732 && subType0 == 20 && hex.length < 150 && hex.endsWith('04')) {
|
// if (MsgType == 732 && subType0 == 20 && hex.length < 150 && hex.endsWith('04')) {
|
||||||
// // 防止上报两次 群聊戳一戳
|
// // 防止上报两次 群聊戳一戳
|
||||||
// if (PokeCache.has(peeruid)) {
|
// if (PokeCache.has(peeruid)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user