mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
feat: poke oidb.0xed3_1
This commit is contained in:
parent
b882bc721d
commit
39c4473367
30
src/core/proto/Poke.ts
Normal file
30
src/core/proto/Poke.ts
Normal file
@ -0,0 +1,30 @@
|
||||
import { MessageType, ScalarType, BinaryWriter } from '@protobuf-ts/runtime';
|
||||
|
||||
export const OidbSvcTrpcTcpBase = new MessageType("oidb_svc_trpctcp_base", [
|
||||
{ no: 1, name: "command", kind: "scalar", T: ScalarType.UINT32 },
|
||||
{ no: 2, name: "subcommand", kind: "scalar", T: ScalarType.UINT32, opt: true },
|
||||
{ no: 4, name: "body", kind: "scalar", T: ScalarType.BYTES, opt: true }
|
||||
]);
|
||||
|
||||
export const OidbSvcTrpcTcp0XED3_1 = new MessageType("oidb_svc_trpctcp_0xed3_1", [
|
||||
{ no: 1, name: "uin", kind: "scalar", T: ScalarType.UINT32 },
|
||||
{ no: 2, name: "groupuin", kind: "scalar", T: ScalarType.UINT32, opt: true },
|
||||
{ no: 5, name: "frienduin", kind: "scalar", T: ScalarType.UINT32, opt: true },
|
||||
{ no: 6, name: "ext", kind: "scalar", T: ScalarType.UINT32 }
|
||||
]);
|
||||
|
||||
export function encodeGroupPoke(groupUin: string, PeerUin: string) {
|
||||
let Body = OidbSvcTrpcTcp0XED3_1.toBinary
|
||||
({
|
||||
uin: parseInt(PeerUin),
|
||||
groupuin: parseInt(groupUin),
|
||||
ext: 0
|
||||
});
|
||||
//console.log(Body)
|
||||
return OidbSvcTrpcTcpBase.toBinary
|
||||
({
|
||||
command: 0xed3,
|
||||
subcommand: 1,
|
||||
body: Body
|
||||
});
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user