split up things
parent
b8b2906fe3
commit
9ba6185335
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"CURRENT_STORY": "Here's the current story: %s",
|
||||
"NO_STORY": "No story in progress at the moment.",
|
||||
"WBW_LAST_USER": "You were the last user to add a word to the story. Wait for someone else to add another one.",
|
||||
"WBW_NEW_WORD": "Added to story. It now reads: %s",
|
||||
"WBW_NEW_WORD": "Added to story. It now reads:",
|
||||
"WBW_RESET": "The story has been reset.",
|
||||
"WBW_INVALID_ID": "No story with that ID."
|
||||
}
|
Loading…
Reference in New Issue