Create basic/documentation.py
Browse files
command/basic/documentation.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Optional
|
2 |
+
from ..command_handler import CommandHandler
|
3 |
+
|
4 |
+
class DocumentationHandler(CommandHandler):
|
5 |
+
def __init__(self, commands, successor: Optional["CommandHandler"] = None):
|
6 |
+
super().__init__(successor)
|
7 |
+
self.commands = commands
|
8 |
+
|
9 |
+
def handle_command(self, command):
|
10 |
+
if command.lower() in self.commands:
|
11 |
+
print(self.execute_command())
|
12 |
+
else:
|
13 |
+
super().handle_command(command)
|
14 |
+
|
15 |
+
def execute_command(self):
|
16 |
+
return "Download ..."
|
17 |
+
|