Update chatbot/plugins/web.py
Browse files- chatbot/plugins/web.py +9 -0
chatbot/plugins/web.py
CHANGED
@@ -14,6 +14,15 @@ import akenoai as dev
|
|
14 |
|
15 |
from . import force_sub
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
@Client.on_message(
|
18 |
~filters.scheduled
|
19 |
& filters.command(["web"])
|
|
|
14 |
|
15 |
from . import force_sub
|
16 |
|
17 |
+
@Client.on_message(filters.command("reloadlang") & filters.user(1191668125))
|
18 |
+
async def reload_languages_cmd(client: Client, message: Message):
|
19 |
+
from chatbot.plugins.languages import load_languages, LANGUAGES, LANGUAGE_DICT
|
20 |
+
LANGUAGES.clear()
|
21 |
+
LANGUAGES.extend(load_languages())
|
22 |
+
LANGUAGE_DICT.clear()
|
23 |
+
LANGUAGE_DICT.update({lang['code']: lang['name'] for lang in LANGUAGES})
|
24 |
+
await message.reply("Language list reloaded successfully.")
|
25 |
+
|
26 |
@Client.on_message(
|
27 |
~filters.scheduled
|
28 |
& filters.command(["web"])
|