Create quest.js
This commit is contained in:
parent
1fc240c280
commit
071708a4be
1 changed files with 8 additions and 0 deletions
8
examples/quest.js
Normal file
8
examples/quest.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
module.exports = async function({text}) {
|
||||
if(!state?.quests){
|
||||
state.quests = {current: 'kill a dragon'}
|
||||
}
|
||||
const completed = await utils.checkQuestCompleted({history, quest: state.quests.current, text})
|
||||
state.message = 'Completed your quest? ' + completed
|
||||
return {text}
|
||||
}
|
Reference in a new issue