%first/%rand/%last image
This commit is contained in:
@@ -9,13 +9,17 @@ from utils import generate_help
|
||||
class RandomScanner(HistoryScanner):
|
||||
@staticmethod
|
||||
def help() -> str:
|
||||
return generate_help("rand", "Read a random message (add text to filter like %find)")
|
||||
return generate_help(
|
||||
"rand",
|
||||
"Read a random message (add text to filter like %find)",
|
||||
args=["image - pull an image instead of a message"],
|
||||
)
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(help=RandomScanner.help(), allow_queries=True)
|
||||
super().__init__(help=RandomScanner.help())
|
||||
|
||||
def allow_message(self, *_) -> bool:
|
||||
return True
|
||||
|
||||
def get_results(self, intro: str) -> List[str]:
|
||||
return self.history.to_string(type="random")
|
||||
async def get_results(self, intro: str) -> List[str]:
|
||||
if self.images_only:
|
||||
return await self.history.to_string_image(type="random")
|
||||
else:
|
||||
return self.history.to_string(type="random")
|
||||
|
||||
Reference in New Issue
Block a user