Update 'node/boto.js'
This commit is contained in:
parent
60c472fedd
commit
a29808a470
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue