Skip to content

Commit

Permalink
Added !setrip to the rip command
Browse files Browse the repository at this point in the history
  • Loading branch information
StereoRocker committed Nov 15, 2016
1 parent c79796b commit f05e038
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions TwitchBot/CommandScripts/rip.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,25 @@ public class CommandClass : Command
rip = 0;
}

public void SetRipHandler(string username, string command, string message)
{
// Check the user is a moderator
if (!CommandAPI.isMod(username))
{
CommandAPI.SendMessage(String.Format("You are not a moderator @{0}!", username));
return;
}

// Try and parse the number to set the counter to
try {
rip = Int32.Parse(message);
} catch (Exception e)
{
CommandAPI.SendMessage(String.Format("Sorry @{0}, the argument was not formatted properly", username));
return;
}
}

public void setup()
{
// Register the chat command handler
Expand Down

0 comments on commit f05e038

Please sign in to comment.