diff --git a/helper_funcs/chat_base.py b/helper_funcs/chat_base.py index 6a2ae2159..b7cda04c0 100644 --- a/helper_funcs/chat_base.py +++ b/helper_funcs/chat_base.py @@ -19,7 +19,7 @@ # the Strings used for this "thing" from translation import Translation -from pyrogram import Client, Filters +from pyrogram import Client, filters # the Telegram trackings from chatbase import Message diff --git a/plugins/custom_thumbnail.py b/plugins/custom_thumbnail.py index ca16f4741..a245c5507 100644 --- a/plugins/custom_thumbnail.py +++ b/plugins/custom_thumbnail.py @@ -28,7 +28,7 @@ from helper_funcs.chat_base import TRChatBase import database.database as sql -@pyrogram.Client.on_message(pyrogram.Filters.command(["generatecustomthumbnail"])) +@pyrogram.Client.on_message(pyrogram.filters.command(["generatecustomthumbnail"])) async def generate_custom_thumbnail(bot, update): if update.from_user.id in Config.BANNED_USERS: await update.reply_text("You are B A N N E D") @@ -80,7 +80,7 @@ async def generate_custom_thumbnail(bot, update): ) -@pyrogram.Client.on_message(pyrogram.Filters.photo) +@pyrogram.Client.on_message(pyrogram.filters.photo) async def save_photo(bot, update): if update.from_user.id in Config.BANNED_USERS: await bot.delete_messages( @@ -116,7 +116,7 @@ async def save_photo(bot, update): ) -@pyrogram.Client.on_message(pyrogram.Filters.command(["deletethumbnail"])) +@pyrogram.Client.on_message(pyrogram.filters.command(["deletethumbnail"])) async def delete_thumbnail(bot, update): if update.from_user.id in Config.BANNED_USERS: await bot.delete_messages( diff --git a/plugins/help_text.py b/plugins/help_text.py index 6684ab59e..83f40a68b 100644 --- a/plugins/help_text.py +++ b/plugins/help_text.py @@ -31,7 +31,7 @@ def GetExpiryDate(chat_id): return expires_at -@pyrogram.Client.on_message(pyrogram.Filters.command(["help", "about"])) +@pyrogram.Client.on_message(pyrogram.filters.command(["help", "about"])) async def help_user(bot, update): # logger.info(update) TRChatBase(update.from_user.id, update.text, "/help") @@ -43,7 +43,7 @@ async def help_user(bot, update): reply_to_message_id=update.message_id ) -@pyrogram.Client.on_message(pyrogram.Filters.command(["start"])) +@pyrogram.Client.on_message(pyrogram.filters.command(["start"])) async def start(bot, update): # logger.info(update) TRChatBase(update.from_user.id, update.text, "/start") @@ -54,7 +54,7 @@ async def start(bot, update): ) -@pyrogram.Client.on_message(pyrogram.Filters.command(["upgrade"])) +@pyrogram.Client.on_message(pyrogram.filters.command(["upgrade"])) async def upgrade(bot, update): # logger.info(update) TRChatBase(update.from_user.id, update.text, "/upgrade") diff --git a/plugins/rename_file.py b/plugins/rename_file.py index 4bcb8b00e..8803708c4 100644 --- a/plugins/rename_file.py +++ b/plugins/rename_file.py @@ -22,7 +22,7 @@ import pyrogram logging.getLogger("pyrogram").setLevel(logging.WARNING) -from pyrogram import Client, Filters +from pyrogram import Client, filters from helper_funcs.chat_base import TRChatBase from helper_funcs.display_progress import progress_for_pyrogram @@ -34,7 +34,7 @@ from database.database import * -@pyrogram.Client.on_message(pyrogram.Filters.command(["rename"])) +@pyrogram.Client.on_message(pyrogram.filters.command(["rename"])) async def rename_doc(bot, update): if update.from_user.id in Config.BANNED_USERS: await update.reply_text("You are B A N N E D") diff --git a/requirements.txt b/requirements.txt index 1af829c3a..5351baee6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,8 +4,8 @@ git+git://github.com/google/chatbase-python.git hachoir numpy Pillow -https://github.com/pyrogram/pyrogram/archive/asyncio-dev.zip requests tgcrypto sqlalchemy psycopg2-binary +Pyrogram==1.0.6