Implement function

This commit is contained in:
Zhao Zuohong 2023-01-06 10:46:08 +08:00
parent 9d282e9586
commit ab7ee77555
1 changed files with 8 additions and 11 deletions

View File

@ -1,16 +1,13 @@
const { KiviPlugin, segment, http } = require('@kivibot/core')
const { KiviPlugin } = require("@kivibot/core");
const plugin = new KiviPlugin('demo', '0.1.0')
const plugin = new KiviPlugin("wuhu-takeoff", "1.0.0");
plugin.onMounted(() => {
plugin.onMessage(event => {
const { raw_message } = event
if (raw_message === 'hello') {
const msgs = [segment.face(66), 'world']
event.reply(msgs)
plugin.onMessage((event) => {
if (event.raw_message == "芜湖") {
event.reply("起飞");
}
})
})
});
});
module.exports = { plugin }
module.exports = { plugin };