From f6e85a7a2cae0be08284bed4da56ba7917aa8896 Mon Sep 17 00:00:00 2001 From: profitroll Date: Sat, 12 Aug 2023 18:45:23 +0200 Subject: [PATCH] This commit closes #6 --- config_example.json | 7 +++++++ locale/de.json | 1 + locale/en.json | 1 + locale/uk.json | 1 + plugins/commands/help.py | 5 ++++- 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/config_example.json b/config_example.json index 80f2094..99f3987 100644 --- a/config_example.json +++ b/config_example.json @@ -106,6 +106,13 @@ "πŸ™Š" ], "commands": { + "help": { + "scopes": [ + { + "name": "BotCommandScopeDefault" + } + ] + }, "language": { "scopes": [ { diff --git a/locale/de.json b/locale/de.json index 43ef90f..887910f 100644 --- a/locale/de.json +++ b/locale/de.json @@ -13,6 +13,7 @@ ] }, "commands": { + "help": "NΓΌtzliche Informationen anzeigen", "language": "Sprache des Bots in dieser Gruppe einstellen", "language_auto": "Automatische Sprachwahl umschalten" }, diff --git a/locale/en.json b/locale/en.json index e0a0c5a..a05f5d3 100644 --- a/locale/en.json +++ b/locale/en.json @@ -10,6 +10,7 @@ ] }, "commands": { + "help": "Show some helpful info", "language": "Set bot's language in this group", "language_auto": "Toggle automatic language selection" }, diff --git a/locale/uk.json b/locale/uk.json index c32fcbc..892eeb6 100644 --- a/locale/uk.json +++ b/locale/uk.json @@ -9,6 +9,7 @@ ] }, "commands": { + "help": "ΠŸΠΎΠΊΠ°Π·Π°Ρ‚ΠΈ корисну Ρ–Π½Ρ„ΠΎΡ€ΠΌΠ°Ρ†Ρ–ΡŽ", "language": "Встановити ΠΌΠΎΠ²Ρƒ Π±ΠΎΡ‚Π° Π² Ρ†Ρ–ΠΉ Π³Ρ€ΡƒΠΏΡ–", "language_auto": "ΠŸΠ΅Ρ€Π΅ΠΊΠ»ΡŽΡ‡ΠΈΡ‚ΠΈ Π°Π²Ρ‚ΠΎΠΌΠ°Ρ‚ΠΈΡ‡Π½ΠΈΠΉ Π²ΠΈΠ±Ρ–Ρ€ ΠΌΠΎΠ²ΠΈ" }, diff --git a/plugins/commands/help.py b/plugins/commands/help.py index 6db21bb..cf520bb 100644 --- a/plugins/commands/help.py +++ b/plugins/commands/help.py @@ -14,4 +14,7 @@ logger = logging.getLogger(__name__) & filters.command(["help", "start"], prefixes=["/"]) # type: ignore ) async def command_help(app: PyroClient, message: Message): - await message.reply_text(app._("help", "messages", locale=message.from_user.language_code)) \ No newline at end of file + await message.reply_text( + app._("help", "messages", locale=message.from_user.language_code), + disable_web_page_preview=True, + )