Last active
May 22, 2016 21:03
-
-
Save captDaylight/283ed8ebb58e5962d267bd6af203e334 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (convo.status === 'completed') { | |
const prc = convo.extractResponse('rockPaperScissors'); | |
channels.get(channel, (err, data) => { | |
if (err) throw err; | |
const updateData = data; | |
updateData.players[user].played = prc; | |
const { players } = updateData; | |
const playerIDs = Object.keys(players); | |
// check if only one player has played | |
const onlyOnePlayed = playerIDs.find((id) => players[id].played === ''); | |
}); | |
} else { | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment