Praxis_Bot/commands/implemented/command_tts_twitch.py
2021-04-11 21:49:15 -04:00

27 lines
966 B
Python

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)
self.help = ["MISSING HELP ENTRY",
"\nExample:","command \"PARAM\""]
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
def get_help(self):
return self.help