Skip to content

Commit

Permalink
commands: fixed whisper and color commands #219
Browse files Browse the repository at this point in the history
  • Loading branch information
Schmoopiie committed Apr 15, 2017
1 parent b4fdc9b commit 56859dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/client.js
Expand Up @@ -151,7 +151,7 @@ client.prototype.handleMessage = function handleMessage(message) {
// Connected to server..
case "372":
this.log.info("Connected to server.");
this.userstate["#jtv"] = {};
this.userstate["#tmijs"] = {};
this.emits(["connected", "_promiseConnect"], [[this.server, this.port], [null]]);
this.reconnections = 0;
this.reconnectTimer = this.reconnectInterval;
Expand Down Expand Up @@ -572,7 +572,7 @@ client.prototype.handleMessage = function handleMessage(message) {
var months = _.get(~~message.tags["msg-param-months"], null);
var prime = message.tags["system-msg"].includes('Twitch\\sPrime');
var userstate = null;

if (msg) {
userstate = message.tags;
userstate['message-type'] = 'resub';
Expand Down
4 changes: 2 additions & 2 deletions lib/commands.js
Expand Up @@ -149,7 +149,7 @@ module.exports = {
newColor = _.get(newColor, channel);

// Send the command to the server and race the Promise against a delay..
return this._sendCommand(this._getPromiseDelay(), "#jtv", `/color ${newColor}`, (resolve, reject) => {
return this._sendCommand(this._getPromiseDelay(), "#tmijs", `/color ${newColor}`, (resolve, reject) => {
// Received _promiseColor event, resolve or reject..
this.once("_promiseColor", (err) => {
if (!err) { resolve([newColor]); }
Expand Down Expand Up @@ -469,7 +469,7 @@ module.exports = {
}

// Send the command to the server and race the Promise against a delay..
return this._sendCommand(this._getPromiseDelay(), "#jtv", `/w ${username} ${message}`, (resolve, reject) => {
return this._sendCommand(this._getPromiseDelay(), "#tmijs", `/w ${username} ${message}`, (resolve, reject) => {
var from = _.channel(username),
userstate = _.merge({
"message-type": "whisper",
Expand Down

0 comments on commit 56859dc

Please sign in to comment.