from abc import ABCMeta from commands.command_base import AbstractCommand class CommandTTS(AbstractCommand, metaclass=ABCMeta): command = "!tts" def __init__(self): super().__init__(CommandTTS.command, n_args=1, command_type=AbstractCommand.CommandType.TWITCH) def do_command(self, bot, twitch_message): args = self.get_args(twitch_message.text) if args[1] == "start": if twitch_message.sender.lower() == twitch_message.channel: bot.send_message("tts activated on #%s" % twitch_message.channel) bot.tts_enabled = True elif args[1] == "stop": if twitch_message.sender.lower() == twitch_message.channel: bot.send_message("tts deactivated on #%s" % twitch_message.channel) bot.tts_enabled = False