mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
feat: contact
This commit is contained in:
parent
e9ede6924e
commit
c145935d46
@ -114,7 +114,7 @@ export interface NodeIKernelBuddyService {
|
|||||||
|
|
||||||
reportDoubtBuddyReqUnread(): void;
|
reportDoubtBuddyReqUnread(): void;
|
||||||
|
|
||||||
getBuddyRecommendContactArkJson(uid: string, phoneNumber: string): Promise<unknown>;
|
getBuddyRecommendContactArkJson(uid: string, phoneNumber: string): Promise<GeneralCallResult & { arkMsg: string }>;
|
||||||
|
|
||||||
isNull(): boolean;
|
isNull(): boolean;
|
||||||
}
|
}
|
||||||
|
@ -607,6 +607,14 @@ export class OneBotMsgApi {
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
[OB11MessageDataType.miniapp]: async () => undefined,
|
[OB11MessageDataType.miniapp]: async () => undefined,
|
||||||
|
|
||||||
|
[OB11MessageDataType.contact]: async ({ data }, context) => {
|
||||||
|
let arkJson = await this.core.apis.UserApi.getBuddyRecommendContactArkJson(data.qq, '');
|
||||||
|
return this.ob11ToRawConverters.json({
|
||||||
|
data: { data: arkJson.arkMsg },
|
||||||
|
type: OB11MessageDataType.json
|
||||||
|
}, context);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(obContext: NapCatOneBot11Adapter, core: NapCatCore) {
|
constructor(obContext: NapCatOneBot11Adapter, core: NapCatCore) {
|
||||||
|
@ -62,6 +62,7 @@ export enum OB11MessageDataType {
|
|||||||
dice = 'dice',
|
dice = 'dice',
|
||||||
RPS = 'rps',
|
RPS = 'rps',
|
||||||
miniapp = 'miniapp',//json类
|
miniapp = 'miniapp',//json类
|
||||||
|
contact = 'contact',
|
||||||
Location = 'location'
|
Location = 'location'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,7 +82,12 @@ export interface OB11MessageText {
|
|||||||
text: string, // 纯文本
|
text: string, // 纯文本
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
export interface OB11MessageContext {
|
||||||
|
type: OB11MessageDataType.contact,
|
||||||
|
data: {
|
||||||
|
qq: string,
|
||||||
|
}
|
||||||
|
}
|
||||||
export interface OB11MessageFileBase {
|
export interface OB11MessageFileBase {
|
||||||
data: {
|
data: {
|
||||||
file_unique?: string,
|
file_unique?: string,
|
||||||
@ -198,7 +204,7 @@ export type OB11MessageData =
|
|||||||
OB11MessageAt | OB11MessageReply |
|
OB11MessageAt | OB11MessageReply |
|
||||||
OB11MessageImage | OB11MessageRecord | OB11MessageFile | OB11MessageVideo |
|
OB11MessageImage | OB11MessageRecord | OB11MessageFile | OB11MessageVideo |
|
||||||
OB11MessageNode | OB11MessageIdMusic | OB11MessageCustomMusic | OB11MessageJson |
|
OB11MessageNode | OB11MessageIdMusic | OB11MessageCustomMusic | OB11MessageJson |
|
||||||
OB11MessageDice | OB11MessageRPS | OB11MessageMarkdown | OB11MessageForward
|
OB11MessageDice | OB11MessageRPS | OB11MessageMarkdown | OB11MessageForward | OB11MessageContext
|
||||||
|
|
||||||
export interface OB11PostSendMsg {
|
export interface OB11PostSendMsg {
|
||||||
message_type?: 'private' | 'group'
|
message_type?: 'private' | 'group'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user