feat: buildSetSpecialTittlePacket

This commit is contained in:
手瓜一十雪 2024-10-13 13:54:52 +08:00
parent 476d8ba14d
commit 71c0728622
2 changed files with 35 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import { NapProtoMsg } from '../proto/NapProto';
import { OidbSvcTrpcTcp0X9067_202 } from '../proto/oidb/Oidb.0x9067_202';
import { OidbSvcTrpcTcpBase } from '../proto/oidb/OidbBase';
import { OidbSvcTrpcTcp0XFE1_2, OidbSvcTrpcTcp0XFE1_2RSP } from '../proto/oidb/Oidb.fe1_2';
import { OidbSvcTrpcTcp0X8FC_2, OidbSvcTrpcTcp0X8FC_2_Body } from '../proto/oidb/Oidb.0x8FC_2';
interface OffsetType {
[key: string]: {
@ -95,6 +96,24 @@ export class NTQQPacketApi {
});
return oidb_packet;
}
async buildSetSpecialTittlePacket(groupCode: string, uid: string, tittle: string) {
let oidb_0x8FC_2_body = new NapProtoMsg(OidbSvcTrpcTcp0X8FC_2_Body).encode({
targetUid: uid,
specialTitle: tittle,
expiredTime: -1,
uinName: tittle
});
let oidb_0x8FC_2 = new NapProtoMsg(OidbSvcTrpcTcp0X8FC_2).encode({
groupUin: +groupCode,
body: oidb_0x8FC_2_body
});
let oidb_packet = new NapProtoMsg(OidbSvcTrpcTcpBase).encode({
command: 0x8FC,
subCommand: 2,
body: oidb_0x8FC_2,
});
return oidb_packet;
}
async buildStatusPacket(uin: number) {
let oidb_0xfe1_2 = new NapProtoMsg(OidbSvcTrpcTcp0XFE1_2).encode({

View File

@ -0,0 +1,16 @@
import { ScalarType } from "@protobuf-ts/runtime";
import { ProtoField } from "../NapProto";
//设置群头衔 OidbSvcTrpcTcp.0x8fc_2
export const OidbSvcTrpcTcp0X8FC_2_Body = {
targetUid: ProtoField(1, ScalarType.STRING),
specialTitle: ProtoField(5, ScalarType.STRING),
expiredTime: ProtoField(6, ScalarType.INT32),
uinName: ProtoField(7, ScalarType.STRING),
targetName: ProtoField(8, ScalarType.STRING),
}
export const OidbSvcTrpcTcp0X8FC_2 = {
groupUin: ProtoField(1, ScalarType.UINT32),
body: ProtoField(3, () => OidbSvcTrpcTcp0X8FC_2_Body),
}