/*
 * --------------------------------------------------------------------------------
 * -------------------- Copyright (C) 2016 <SoWhoYou, Inc.> -----------------------
 * --------------------------------------------------------------------------------
 *                  Project Name : TwitchBot
 *                   Github Repo : https://www.github.com/SoWhoYou
 * --------------------------------------------------------------------------------
 *                        Author : SoWhoYou
 *                       Website : www.SoWhoYou.com
 *                        E-Mail : SoWhoYou@Gmail.com
 * --------------------------------------------------------------------------------
 *                    Created on : <Jun 12, 2016> at <6:39:46 PM>
 * --------------------------------------------------------------------------------
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * --------------------------------------------------------------------------------
 */
package com.sowhoyou.twitchbot.command.commands;

import com.sowhoyou.twitchbot.command.Command;
import com.sowhoyou.twitchbot.command.CommandParser.CommandData;
import com.sowhoyou.twitchbot.event.events.MessageReceivedEvent;

public class TotalViewers implements Command {

	@Override
	public boolean valid(CommandData commandData) {
		return true;
	}

	@Override
	public void action(CommandData commandData) {
		if (commandData.getEvent() instanceof MessageReceivedEvent) {
			MessageReceivedEvent e = (MessageReceivedEvent) commandData.getEvent();
			e.onMessageRecievedEvent(e.getSender(), e.getBot().getBotHelper().getTotalViewersToString());
		}
	}

	@Override
	public void execute(CommandData commandData, boolean success) {}

	@Override
	public String help() {
		return null;
	}
}
