diff --git a/node/boto.js b/node/boto.js index 34322f1..d5d1609 100644 --- a/node/boto.js +++ b/node/boto.js @@ -24,7 +24,7 @@ const rp = require('request-promise'); function getChatters(channelName, _attemptCount = 0) { return rp({ - uri: `https://tmi.twitch.tv/group/user/sarimoko/chatters`, + uri: `https://tmi.twitch.tv/group/user/${channelName}/chatters`, json: true }) .then(data => { @@ -85,11 +85,11 @@ client.on('message', (channel, tags, message, self) => { getRandomChatter(chan, { skipList: [ userstate.username ] }) .then(user => { if(user === null) { - client.send(chan, `${userstate.username}, there was no one to choose.`); + client.send(channel, `${userstate.username}, there was no one to choose.`); } else { let { name, type } = user; - client.send(chan, `${userstate.username}, I chose "${name}" with type ${type}!`); + client.send(channel, `${userstate.username}, I chose "${name}" with type ${type}!`); } }) .catch(err => console.log('[ERR]', err));