mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
feat: withdrawMessage
This commit is contained in:
parent
79115d67ff
commit
5c1de8be0b
@ -115,5 +115,24 @@ export class LaanaMessageActionHandler {
|
|||||||
),
|
),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
withdrawMessage: async (params) => {
|
||||||
|
const { msgId, chatType, peerUid } = this.laana.utils.msg.decodeLaanaMsgId(params.msgId);
|
||||||
|
try {
|
||||||
|
await this.core.apis.MsgApi.recallMsg(
|
||||||
|
{
|
||||||
|
chatType,
|
||||||
|
peerUid,
|
||||||
|
guildId: '',
|
||||||
|
},
|
||||||
|
msgId,
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
throw new Error(`消息撤回失败: ${e}`);
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
success: true,
|
||||||
|
};
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user