from typing import Optional | |
from ..command_handler import CommandHandler | |
class DocumentationHandler(CommandHandler): | |
def __init__(self, commands, successor: Optional["CommandHandler"] = None): | |
super().__init__(successor) | |
self.commands = commands | |
def handle_command(self, command): | |
if command.lower() in self.commands: | |
print(self.execute_command()) | |
else: | |
super().handle_command(command) | |
def execute_command(self): | |
return "Download ..." | |