Skip to content

Commit

Permalink
lowercase command as well as param. Issue clarkio#61
Browse files Browse the repository at this point in the history
  • Loading branch information
surly@surlydev.net committed May 27, 2019
1 parent 51121d9 commit b639b59
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/commands/Themer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,15 @@ export class Themer {
*/
public async handleCommands(twitchUser: Userstate, command: string, param: string) {

/** Only command we're going to respond to is !theme */
command = command.toLowerCase().trim();

/** Only command we're going to respond to is !theme */
if (command !== '!theme') {
return;
}

param = param.toLowerCase().trim();
const twitchUserName = twitchUser["display-name"];

param = param.toLowerCase().trim();

let username: string | undefined;
/** Determine if the param is a (un)ban request */
Expand Down Expand Up @@ -394,4 +395,4 @@ export class Themer {
private clearListRecipients() {
this._listRecipients = [];
}
}
}

0 comments on commit b639b59

Please sign in to comment.