From 98d8e969229fdd22829c5c0e5045afab4d35a0aa Mon Sep 17 00:00:00 2001 From: dtookey Date: Fri, 2 Oct 2020 14:35:55 -0400 Subject: [PATCH] removed class imports from command scripts --- commands/command_base.py | 4 ---- commands/implemented/command_test.py | 5 +---- commands/implemented/command_tts.py | 6 ++---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/commands/command_base.py b/commands/command_base.py index 5e50e85..f3b479a 100644 --- a/commands/command_base.py +++ b/commands/command_base.py @@ -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): """ diff --git a/commands/implemented/command_test.py b/commands/implemented/command_test.py index 45fd60f..c764dd8 100644 --- a/commands/implemented/command_test.py +++ b/commands/implemented/command_test.py @@ -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") diff --git a/commands/implemented/command_tts.py b/commands/implemented/command_tts.py index 91abc71..4392cc5 100644 --- a/commands/implemented/command_tts.py +++ b/commands/implemented/command_tts.py @@ -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)