split up things
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user