22 lines
717 B
Python
22 lines
717 B
Python
from abc import ABCMeta
|
|
|
|
from commands.command_base import AbstractCommand
|
|
|
|
import utilities_script as utilities
|
|
|
|
class CommandTTS(AbstractCommand, metaclass=ABCMeta):
|
|
command = "!restart"
|
|
|
|
def __init__(self):
|
|
super().__init__(CommandTTS.command, n_args=0, 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 twitch_message.sender.lower() == twitch_message.channel:
|
|
bot.send_message("Bot restarting...")
|
|
utilities.restart_self()
|
|
|
|
def get_help(self):
|
|
return self.help |