提交 b4f64d2f 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

Merge branch 'master' of github.com:Chatie/wechaty

......@@ -100,7 +100,7 @@
"read-pkg-up": "^7.0.0",
"state-switch": "^0.6.2",
"watchdog": "^0.8.1",
"wechaty-puppet": "^0.17.3",
"wechaty-puppet": "^0.17.4",
"ws": "^7.0.0"
},
"devDependencies": {
......
......@@ -570,6 +570,27 @@ export class Message extends Accessory implements Sayable {
}
}
/**
* Recall a message.
* > Tips:
* @returns {Promise<boolean>}
*
* @example
* const bot = new Wechaty()
* bot
* .on('message', async m => {
* const recallMessage = await msg.say('123')
* if (recallMessage) {
* const isSuccess = await recallMessage.recall()
* }
* })
*/
public async recall (): Promise<boolean> {
const isSuccess = await this.puppet.messageRecall(this.id)
return isSuccess
}
/**
* Get the type from the message.
* > Tips: MessageType is Enum here. </br>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册