This repository has been archived on 2024-08-21. You can view files and clone it, but cannot push or open issues or pull requests.
BWTAqua/plugins/help.py
2023-05-16 20:50:18 +02:00

25 lines
736 B
Python

# -*- coding: utf-8 -*-
import logging
from libbot import json_read
from pyrogram import filters
from pyrogram.client import Client
from pyrogram.types import Message
from modules.utils import string, userSet
logger = logging.getLogger(__name__)
@Client.on_message(
~filters.scheduled
& filters.command(["start", "help", "допомога"], prefixes=["/", ""]) # type: ignore
)
async def command_help(app: Client, msg: Message):
await msg.reply_text((await string("welcome")).format(await string("get_number")))
if msg.from_user.language_code in await json_read("strings.json"):
userSet(msg.from_user.id, "locale", msg.from_user.language_code)
else:
userSet(msg.from_user.id, "locale", "en")