First commit

This commit is contained in:
Zhao Zuohong 2023-01-06 10:20:01 +08:00
commit 9d282e9586
1 changed files with 16 additions and 0 deletions

16
index.js Normal file
View File

@ -0,0 +1,16 @@
const { KiviPlugin, segment, http } = require('@kivibot/core')
const plugin = new KiviPlugin('demo', '0.1.0')
plugin.onMounted(() => {
plugin.onMessage(event => {
const { raw_message } = event
if (raw_message === 'hello') {
const msgs = [segment.face(66), 'world']
event.reply(msgs)
}
})
})
module.exports = { plugin }