From ab7ee77555647cbd65c4daaae2ea2c61f85af899 Mon Sep 17 00:00:00 2001 From: Zhao Zuohong <1040110848@qq.com> Date: Fri, 6 Jan 2023 10:46:08 +0800 Subject: [PATCH] :sparkles: Implement function --- index.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/index.js b/index.js index 79a9f73..a43e801 100644 --- a/index.js +++ b/index.js @@ -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 } \ No newline at end of file +module.exports = { plugin };