history commands

This commit is contained in:
Klemek
2021-04-06 23:01:51 +02:00
parent aa32382e1d
commit e9505fa082
14 changed files with 215 additions and 11 deletions
+19
View File
@@ -0,0 +1,19 @@
from typing import List
# Custom libs
from .history_scanner import HistoryScanner
class RandomScanner(HistoryScanner):
@staticmethod
def help() -> str:
return super(RandomScanner, RandomScanner).help(
cmd="rand", text="Read a random message"
)
def __init__(self):
super().__init__(help=RandomScanner.help())
def get_results(self, intro: str) -> List[str]:
return self.history.to_string(type="random")