Modified do_command to receive the Twitch_Module class from twitch_script.py and the twitch.chat.Message from the bot implemented the loader in the bot
18 lines
493 B
Python
18 lines
493 B
Python
from abc import ABCMeta
|
|
|
|
import twitch.chat
|
|
|
|
from commands.command_base import AbstractCommand
|
|
from twitch_script import Twitch_Module
|
|
|
|
|
|
class CommandTest(AbstractCommand, metaclass=ABCMeta):
|
|
command = "!test"
|
|
|
|
def __init__(self):
|
|
super().__init__(CommandTest.command, command_type=AbstractCommand.CommandType.TWITCH)
|
|
|
|
def do_command(self, bot: Twitch_Module, twitch_message: twitch.chat.Message):
|
|
print("!test Detected")
|
|
bot.chat.send("test acknowledged")
|