Create quest.js

This commit is contained in:
Nick Walton 2020-05-23 22:00:46 -06:00 committed by GitHub
parent 1fc240c280
commit 071708a4be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

8
examples/quest.js Normal file
View 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}
}