dev #19

Merged
profitroll merged 98 commits from dev into master 2023-04-24 13:48:22 +03:00
4 changed files with 9 additions and 9 deletions
Showing only changes of commit 25af9b31f8 - Show all commits

View File

@ -1,9 +1,9 @@
from os import listdir
from pyrogram.client import Client
from classes.poster_client import PosterClient
from pyrogram.types import BotCommand, BotCommandScopeChat
from modules.utils import configGet, locale
async def register_commands(app: Client):
async def register_commands(app: PosterClient):
if configGet("submit", "mode"):
# Registering user commands

View File

@ -1,11 +1,11 @@
from modules.app import app
from pyrogram import filters
from pyrogram.types import CallbackQuery
from pyrogram.client import Client
from classes.poster_client import PosterClient
from modules.utils import locale
# Callback empty ===============================================================================================================
@app.on_callback_query(filters.regex("nothing"))
async def callback_query_nothing(app: Client, clb: CallbackQuery):
async def callback_query_nothing(app: PosterClient, clb: CallbackQuery):
await clb.answer(text=locale("nothing", "callback", locale=clb.from_user))
# ==============================================================================================================================

View File

@ -1,7 +1,7 @@
from os import getpid
from pyrogram import filters
from pyrogram.client import Client
from classes.poster_client import PosterClient
from pyrogram.types import Message
from modules.app import app
@ -10,7 +10,7 @@ from modules.utils import configGet, killProc, locale
@app.on_message(~ filters.scheduled & filters.command(["kill", "die", "reboot"], prefixes=["", "/"]))
async def cmd_kill(app: Client, msg: Message):
async def cmd_kill(app: PosterClient, msg: Message):
if msg.from_user.id == configGet("admin"):
pid = getpid()

View File

@ -1,5 +1,5 @@
from pyrogram import filters
from pyrogram.client import Client
from classes.poster_client import PosterClient
from pyrogram.types import Message
from modules.app import app
@ -8,11 +8,11 @@ from modules.utils import configGet, jsonLoad, locale
@app.on_message(~ filters.scheduled & filters.command(["start"], prefixes="/"))
async def cmd_start(app: Client, msg: Message):
async def cmd_start(app: PosterClient, msg: Message):
if subBlocked(msg.from_user) is False:
await msg.reply_text(locale("start", "message", locale=msg.from_user.language_code))
@app.on_message(~ filters.scheduled & filters.command(["rules", "help"], prefixes="/"))
async def cmd_rules(app: Client, msg: Message):
async def cmd_rules(app: PosterClient, msg: Message):
if subBlocked(msg.from_user) is False:
await msg.reply_text(locale("rules", "message", locale=msg.from_user.language_code))