Compare commits

...

2 Commits

Author SHA1 Message Date
dtookey
1993593150 Merge remote-tracking branch 'origin/command-loader' into command-loader
# Conflicts:
#	twitch_script.py
2020-10-02 13:49:48 -04:00
dtookey
7c870caa92 implemented a few doodads on the AbstractCommand class to make integration easier.
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
2020-10-02 13:49:39 -04:00

View File

@ -67,11 +67,11 @@ class Twitch_Module():
self.tts_message(message)
def eval_commands(self, message: twitch.chat.Message):
containsURL: bool = self.contains_url(message)
# containsURL: bool = self.contains_url(message)
command_text = message.text[0:message.text.index(' ')]
command = self.commands[command_text]
if command is not None and command.command_type is not AbstractCommand.CommandType.NONE:
if command is not None and command.command_type is AbstractCommand.CommandType.TWITCH:
command.do_command(self, message)
# if message.text.startswith('!tts start'):