removed class imports from command scripts
This commit is contained in:
parent
948877f0ee
commit
143691c186
@ -1,10 +1,6 @@
|
|||||||
from abc import ABCMeta, abstractmethod
|
from abc import ABCMeta, abstractmethod
|
||||||
from enum import Enum, auto
|
from enum import Enum, auto
|
||||||
|
|
||||||
import twitch.chat
|
|
||||||
|
|
||||||
from twitch_script import Twitch_Module
|
|
||||||
|
|
||||||
|
|
||||||
class AbstractCommand(metaclass=ABCMeta):
|
class AbstractCommand(metaclass=ABCMeta):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -1,9 +1,6 @@
|
|||||||
from abc import ABCMeta
|
from abc import ABCMeta
|
||||||
|
|
||||||
import twitch.chat
|
|
||||||
|
|
||||||
from commands.command_base import AbstractCommand
|
from commands.command_base import AbstractCommand
|
||||||
from twitch_script import Twitch_Module
|
|
||||||
|
|
||||||
|
|
||||||
class CommandTest(AbstractCommand, metaclass=ABCMeta):
|
class CommandTest(AbstractCommand, metaclass=ABCMeta):
|
||||||
@ -12,6 +9,6 @@ class CommandTest(AbstractCommand, metaclass=ABCMeta):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(CommandTest.command, command_type=AbstractCommand.CommandType.TWITCH)
|
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")
|
print("!test Detected")
|
||||||
twitch_message.chat.send("test acknowledged")
|
twitch_message.chat.send("test acknowledged")
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
from abc import ABCMeta
|
from abc import ABCMeta
|
||||||
|
|
||||||
import twitch.chat
|
|
||||||
|
|
||||||
from commands.command_base import AbstractCommand
|
from commands.command_base import AbstractCommand
|
||||||
from twitch_script import Twitch_Module
|
|
||||||
|
|
||||||
|
|
||||||
class CommandTTS(AbstractCommand, metaclass=ABCMeta):
|
class CommandTTS(AbstractCommand, metaclass=ABCMeta):
|
||||||
@ -12,7 +10,7 @@ class CommandTTS(AbstractCommand, metaclass=ABCMeta):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__(CommandTTS.command, n_args=1, command_type=AbstractCommand.CommandType.TWITCH)
|
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)
|
args = self.get_args(twitch_message.text)
|
||||||
if args[1] == "start":
|
if args[1] == "start":
|
||||||
bot.send_message("tts activated on #%s" % twitch_message.channel)
|
bot.send_message("tts activated on #%s" % twitch_message.channel)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user