This commit is contained in:
手瓜一十雪
2025-02-18 13:24:37 +08:00
parent df3e302a9d
commit 6b3bfa1ee9
2 changed files with 5 additions and 5 deletions

View File

@@ -465,14 +465,14 @@ export interface NodeIKernelMsgService {
setMsgEmojiLikesForRole(...args: unknown[]): unknown;
clickInlineKeyboardButton(params: {
guildId: string,
guildId?: string,
peerId: string,
botAppid: string,
msgSeq: string,
buttonId: string,
callback_data: string,
dmFlag: number,
chatType: number
chatType: number // 1私聊 2群
}): Promise<GeneralCallResult & { status: number, promptText: string, promptType: number, promptIcon: number }>;
setCurOnScreenMsg(...args: unknown[]): unknown;

View File

@@ -7,6 +7,7 @@ const SchemaData = Type.Object({
bot_appid: Type.String(),
button_id: Type.String({ default: '' }),
callback_data: Type.String({ default: '' }),
msg_seq: Type.String({ default: '10086' }),
});
type Payload = Static<typeof SchemaData>;
@@ -18,13 +19,12 @@ export class ClickInlineKeyboardButton extends OneBotAction<Payload, unknown> {
async _handle(payload: Payload) {
return await this.core.apis.MsgApi.clickInlineKeyboardButton({
buttonId: payload.button_id,
guildId: '',// 频道使用
peerId: payload.group_id.toString(),
botAppid: payload.bot_appid,
msgSeq: '10086',
msgSeq: payload.msg_seq,
callback_data: payload.callback_data,
dmFlag: 0,
chatType: 1
chatType: 2
})
}
}