Praxis_Bot/commands/implemented/command_chyron.py
2021-04-09 17:57:54 -04:00

35 lines
1.0 KiB
Python

from abc import ABCMeta
import chyron_module
from commands.command_base import AbstractCommand
import random
import utilities_script as utilities
class CommandRoll(AbstractCommand, metaclass=ABCMeta):
"""
this is the roll command.
"""
command = "chyron"
def __init__(self):
super().__init__(CommandRoll.command, n_args=5, command_type=AbstractCommand.CommandType.Praxis)
def do_command(self, bot, user_message):
tempBool = True
if tempBool == True:
tempParsedMessage = user_message.message.split(" ")
i = len(tempParsedMessage)
if i > 1:
if "update" in tempParsedMessage[1]:
chyron = chyron_module.Chyron_Module()
if i > 2:
chyron.main(tempParsedMessage[2])
else:
chyron.main()
chyron.updateChyronFile()
returnMessage = "@" + user_message.user + " updated the chyron!"
bot.return_message(returnMessage)