mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
fix: typo
This commit is contained in:
@@ -68,8 +68,8 @@ export class PacketOperationContext {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async SetGroupSpecialTitle(groupUin: number, uid: string, tittle: string) {
|
async SetGroupSpecialTitle(groupUin: number, uid: string, title: string) {
|
||||||
const req = trans.SetSpecialTitle.build(groupUin, uid, tittle);
|
const req = trans.SetSpecialTitle.build(groupUin, uid, title);
|
||||||
await this.context.client.sendOidbPacket(req);
|
await this.context.client.sendOidbPacket(req);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -8,14 +8,14 @@ class SetSpecialTitle extends PacketTransformer<typeof proto.OidbSvcTrpcTcpBase>
|
|||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
build(groupCode: number, uid: string, tittle: string): OidbPacket {
|
build(groupCode: number, uid: string, title: string): OidbPacket {
|
||||||
const oidb_0x8FC_2 = new NapProtoMsg(proto.OidbSvcTrpcTcp0X8FC_2).encode({
|
const oidb_0x8FC_2 = new NapProtoMsg(proto.OidbSvcTrpcTcp0X8FC_2).encode({
|
||||||
groupUin: +groupCode,
|
groupUin: +groupCode,
|
||||||
body: {
|
body: {
|
||||||
targetUid: uid,
|
targetUid: uid,
|
||||||
specialTitle: tittle,
|
specialTitle: title,
|
||||||
expiredTime: -1,
|
expiredTime: -1,
|
||||||
uinName: tittle
|
uinName: title
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return OidbBase.build(0x8FC, 2, oidb_0x8FC_2, false, false);
|
return OidbBase.build(0x8FC, 2, oidb_0x8FC_2, false, false);
|
||||||
|
@@ -10,8 +10,8 @@ const SchemaData = Type.Object({
|
|||||||
|
|
||||||
type Payload = Static<typeof SchemaData>;
|
type Payload = Static<typeof SchemaData>;
|
||||||
|
|
||||||
export class SetSpecialTittle extends GetPacketStatusDepends<Payload, void> {
|
export class SetSpecialTitle extends GetPacketStatusDepends<Payload, void> {
|
||||||
override actionName = ActionName.SetSpecialTittle;
|
override actionName = ActionName.SetSpecialTitle;
|
||||||
override payloadSchema = SchemaData;
|
override payloadSchema = SchemaData;
|
||||||
|
|
||||||
async _handle(payload: Payload) {
|
async _handle(payload: Payload) {
|
@@ -81,7 +81,7 @@ import { GetGroupSystemMsg } from './system/GetSystemMsg';
|
|||||||
import { GroupPoke } from './group/GroupPoke';
|
import { GroupPoke } from './group/GroupPoke';
|
||||||
import { GetUserStatus } from './extends/GetUserStatus';
|
import { GetUserStatus } from './extends/GetUserStatus';
|
||||||
import { GetRkey } from './extends/GetRkey';
|
import { GetRkey } from './extends/GetRkey';
|
||||||
import { SetSpecialTittle } from './extends/SetSpecialTittle';
|
import { SetSpecialTitle } from './extends/SetSpecialTitle';
|
||||||
import { GetGroupShutList } from './group/GetGroupShutList';
|
import { GetGroupShutList } from './group/GetGroupShutList';
|
||||||
import { GetGroupMemberList } from './group/GetGroupMemberList';
|
import { GetGroupMemberList } from './group/GetGroupMemberList';
|
||||||
import { GetGroupFileUrl } from '@/onebot/action/file/GetGroupFileUrl';
|
import { GetGroupFileUrl } from '@/onebot/action/file/GetGroupFileUrl';
|
||||||
@@ -215,7 +215,7 @@ export function createActionMap(obContext: NapCatOneBot11Adapter, core: NapCatCo
|
|||||||
new FriendPoke(obContext, core),
|
new FriendPoke(obContext, core),
|
||||||
new GetUserStatus(obContext, core),
|
new GetUserStatus(obContext, core),
|
||||||
new GetRkey(obContext, core),
|
new GetRkey(obContext, core),
|
||||||
new SetSpecialTittle(obContext, core),
|
new SetSpecialTitle(obContext, core),
|
||||||
new SetDiyOnlineStatus(obContext, core),
|
new SetDiyOnlineStatus(obContext, core),
|
||||||
// new UploadForwardMsg(obContext, core),
|
// new UploadForwardMsg(obContext, core),
|
||||||
new GetGroupShutList(obContext, core),
|
new GetGroupShutList(obContext, core),
|
||||||
|
@@ -31,7 +31,7 @@ export const ActionName = {
|
|||||||
SetGroupCard: 'set_group_card',
|
SetGroupCard: 'set_group_card',
|
||||||
SetGroupName: 'set_group_name',
|
SetGroupName: 'set_group_name',
|
||||||
SetGroupLeave: 'set_group_leave',
|
SetGroupLeave: 'set_group_leave',
|
||||||
SetSpecialTittle: 'set_group_special_title',
|
SetSpecialTitle: 'set_group_special_title',
|
||||||
SetFriendAddRequest: 'set_friend_add_request',
|
SetFriendAddRequest: 'set_friend_add_request',
|
||||||
SetGroupAddRequest: 'set_group_add_request',
|
SetGroupAddRequest: 'set_group_add_request',
|
||||||
GetLoginInfo: 'get_login_info',
|
GetLoginInfo: 'get_login_info',
|
||||||
|
@@ -1281,21 +1281,21 @@ export class OneBotMsgApi {
|
|||||||
// if (parsedParts[1] && parsedParts[3]) {
|
// if (parsedParts[1] && parsedParts[3]) {
|
||||||
// let set_user_id: string = (parsedParts[1].content as { data: string }).data;
|
// let set_user_id: string = (parsedParts[1].content as { data: string }).data;
|
||||||
// let uid = await this.core.apis.UserApi.getUidByUinV2(set_user_id);
|
// let uid = await this.core.apis.UserApi.getUidByUinV2(set_user_id);
|
||||||
// let new_tittle: string = (parsedParts[3].content as { text: string }).text;
|
// let new_title: string = (parsedParts[3].content as { text: string }).text;
|
||||||
// console.log(this.core.apis.GroupApi.groupMemberCache.get(group)?.get(uid)?.memberSpecialTitle, new_tittle)
|
// console.log(this.core.apis.GroupApi.groupMemberCache.get(group)?.get(uid)?.memberSpecialTitle, new_title)
|
||||||
// if (this.core.apis.GroupApi.groupMemberCache.get(group)?.get(uid)?.memberSpecialTitle == new_tittle) {
|
// if (this.core.apis.GroupApi.groupMemberCache.get(group)?.get(uid)?.memberSpecialTitle == new_title) {
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
// await this.core.apis.GroupApi.refreshGroupMemberCachePartial(group, uid);
|
// await this.core.apis.GroupApi.refreshGroupMemberCachePartial(group, uid);
|
||||||
// //let json_data_1_url_search = new URL((parsedParts[3].content as { url: string }).url).searchParams;
|
// //let json_data_1_url_search = new URL((parsedParts[3].content as { url: string }).url).searchParams;
|
||||||
// //let is_new: boolean = json_data_1_url_search.get('isnew') === '1';
|
// //let is_new: boolean = json_data_1_url_search.get('isnew') === '1';
|
||||||
|
|
||||||
// //console.log(group, set_user_id, is_new, new_tittle);
|
// //console.log(group, set_user_id, is_new, new_title);
|
||||||
// return new GroupMemberTitle(
|
// return new GroupMemberTitle(
|
||||||
// this.core,
|
// this.core,
|
||||||
// +group,
|
// +group,
|
||||||
// +set_user_id,
|
// +set_user_id,
|
||||||
// new_tittle
|
// new_title
|
||||||
// );
|
// );
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
Reference in New Issue
Block a user