Permalink
Browse files

Fix bug where a hosted stream username is not lower cased.

  • Loading branch information...
roncli committed Feb 14, 2018
1 parent 6e9908f commit bac3e5e1cfe300f9e8ead7ed94d92e6fafa83d30
Showing with 12 additions and 3 deletions.
  1. +7 −1 README.md
  2. +2 −0 commands.js
  3. +3 −2 discord.js
@@ -86,11 +86,17 @@ The following should be the contents of settings.js:
Coming Soon
===========
1.4.1
1.4.2
-----
* Upgrade to new Twitch library that uses the new Helix API.
* Nothing to see here. 😴
1.4.1
-----
* Discord.js update to get channels inside categories working as expected.
* Remove streamers that are no longer on the Discord server.
* Get out. 👉
Version History
===============
1.4 - 12/25/2017
@@ -400,6 +400,8 @@ class Commands {
return;
}
message = message.toLowerCase();
if (Discord.currentHost === message) {
commands.service.queue(`Sorry, ${user}, but I am already hosting ${message}.`);
reject(new Error("Cannot host the currently hosted channel."));
@@ -628,16 +628,17 @@ class Discord {
});
}
if (stream.channel.display_name.toLowerCase() === "sixgaminggg") {
if (stream.channel.display_name.toLowerCase() === "sixgaminggg") { // TODO: Should be lower case'd user name!
message.embed.description = `${streamNotifyRole} - Six Gaming just went live on Twitch! Watch at ${stream.channel.url}`;
currentHost = "";
manualHosting = false;
Tmi.unhost("sixgaminggg");
Tmi.queue("What's going on everyone? Six Gaming is live!");
discord.user.setStatus("online");
discord.user.setActivity(stream.channel.status, {url: "http://twitch.tv/SixGamingGG", type: "STREAMING"});
} else if (streamers.indexOf(stream.channel.display_name.toLowerCase()) !== -1) {
} else if (streamers.indexOf(stream.channel.display_name.toLowerCase()) !== -1) { // TODO: Should be lower case'd user name!
message.embed.description = `${streamNotifyRole} - Six Gamer ${stream.channel.display_name} just went live on Twitch! Watch at ${stream.channel.url}`;
// TODO: Should be lower case'd user name!
} else if (hosts.indexOf(stream.channel.display_name.toLowerCase()) !== -1) { // eslint-disable-line no-negated-condition
message.embed.description = `${stream.channel.display_name} just went live on Twitch! Watch at ${stream.channel.url}`;
} else {

0 comments on commit bac3e5e

Please sign in to comment.