command_cache for %repeat and %mobile

This commit is contained in:
Klemek
2021-04-21 20:14:06 +02:00
parent 3100e6fa20
commit 7fad35a4b3
5 changed files with 70 additions and 2 deletions
+13 -1
View File
@@ -6,7 +6,7 @@ if sys.version_info < (3, 7):
print("Please upgrade your Python version to 3.7.0 or higher")
sys.exit(1)
from utils import emojis, gdpr
from utils import emojis, gdpr, command_cache
from scanners import (
EmotesScanner,
FullScanner,
@@ -71,6 +71,18 @@ bot.register_command(
"words: (BETA) rank words by their usage",
WordsScanner.help(),
)
bot.register_command(
"repeat",
command_cache.repeat,
"repeat: repeat last analysis (adding supplied arguments)",
"```\n%repeat: repeat last analysis (adding supplied arguments)\n```",
)
bot.register_command(
"mobile",
lambda *args: command_cache.repeat(*args, add_args=["mobile"]),
"mobile: fix @invalid-user for last command but mentions users",
"```\n%mobile: fix @invalid-user for last command but mentions users\n```",
)
bot.register_command(
"last",
lambda *args: LastScanner().compute(*args),