factorized help and triple-quote multi-line

This commit is contained in:
Klemek
2021-04-09 15:34:03 +02:00
parent 5f903db929
commit b7a6f3313b
18 changed files with 134 additions and 185 deletions
+10 -11
View File
@@ -9,7 +9,7 @@ from logs import ChannelLogs, MessageLog
from .scanner import Scanner
from data_types import Counter
from utils import (
COMMON_HELP_ARGS,
generate_help,
plural,
precise,
)
@@ -18,16 +18,15 @@ from utils import (
class WordsScanner(Scanner):
@staticmethod
def help() -> str:
return (
"```\n"
+ "%words: (BETA) Rank words by their usage\n"
+ "arguments:\n"
+ COMMON_HELP_ARGS
+ "* <n> - words containings <n> or more letters, default is 3\n"
+ "* <n2> - top <n2> words, default is 10\n"
+ "* everyone - include bots\n"
+ "Example: %words 5 10 #mychannel1 #mychannel2 @user\n"
+ "```"
return generate_help(
"words",
"(BETA) Rank words by their usage",
args=[
"<n> - words containings <n> or more letters, default is 3",
"<n2> - top <n2> words, default is 10",
"all/everyone - include bots",
],
example="5 10 #mychannel1 #mychannel2 @user",
)
def __init__(self):