split up things

This commit is contained in:
2021-11-05 02:32:33 +01:00
parent b8b2906fe3
commit 9ba6185335
2 changed files with 3 additions and 3 deletions

View File

@@ -19,12 +19,12 @@ module.exports = function (bot, api) {
}
} else {
let lastUser = await api.db.get('select value from BotState where key="last_wbw"');
console.log(lastUser.value, message.author.id);
if (message.author.id == lastUser.value) {
return api.respond(message, printf(api.strings.WBW_LAST_USER))
} else {
bot.currentWBW += args[1] + ' ';
api.respond(message, printf(api.strings.WBW_NEW_WORD, bot.currentWBW))
api.respond(message, printf(api.strings.WBW_NEW_WORD))
api.speak(bot.currentWBW)
await api.db.run('update BotState set value=? where key="last_wbw"', message.author.id);
}
}