removed class imports from command scripts

This commit is contained in:
dtookey 2020-10-02 14:35:55 -04:00
parent 948877f0ee
commit 143691c186
3 changed files with 3 additions and 12 deletions

View File

@ -1,10 +1,6 @@
from abc import ABCMeta, abstractmethod
from enum import Enum, auto
import twitch.chat
from twitch_script import Twitch_Module
class AbstractCommand(metaclass=ABCMeta):
"""

View File

@ -1,9 +1,6 @@
from abc import ABCMeta
import twitch.chat
from commands.command_base import AbstractCommand
from twitch_script import Twitch_Module
class CommandTest(AbstractCommand, metaclass=ABCMeta):
@ -12,6 +9,6 @@ class CommandTest(AbstractCommand, metaclass=ABCMeta):
def __init__(self):
super().__init__(CommandTest.command, command_type=AbstractCommand.CommandType.TWITCH)
def do_command(self, bot: Twitch_Module, twitch_message: twitch.chat.Message):
def do_command(self, bot, twitch_message):
print("!test Detected")
twitch_message.chat.send("test acknowledged")

View File

@ -1,9 +1,7 @@
from abc import ABCMeta
import twitch.chat
from commands.command_base import AbstractCommand
from twitch_script import Twitch_Module
class CommandTTS(AbstractCommand, metaclass=ABCMeta):
@ -12,7 +10,7 @@ class CommandTTS(AbstractCommand, metaclass=ABCMeta):
def __init__(self):
super().__init__(CommandTTS.command, n_args=1, command_type=AbstractCommand.CommandType.TWITCH)
def do_command(self, bot: Twitch_Module, twitch_message: twitch.chat.Message):
def do_command(self, bot, twitch_message):
args = self.get_args(twitch_message.text)
if args[1] == "start":
bot.send_message("tts activated on #%s" % twitch_message.channel)