Changed Client to PosterClient
This commit is contained in:
parent
28fc359593
commit
25af9b31f8
@ -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
|
||||
|
@ -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))
|
||||
# ==============================================================================================================================
|
@ -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()
|
||||
|
@ -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))
|
Reference in New Issue
Block a user