diff --git a/eat/main.py b/eat/main.py index 9cc3545..ca2296c 100644 --- a/eat/main.py +++ b/eat/main.py @@ -6,6 +6,7 @@ from os import sep from random import randint from pyrogram import Client +from pyrogram.enums import MessageEntityType from pyrogram.errors import PeerIdInvalid, UsernameNotOccupied from pyrogram.types import User, Chat @@ -225,11 +226,11 @@ async def eat(client_: Client, context: Message): else: user = context.sender_chat if context.entities is not None: - if context.entities[0].type == "text_mention": + if context.entities[0].type == MessageEntityType.TEXT_MENTION: user = context.entities[0].user - elif context.entities[0].type == "phone_number": + elif context.entities[0].type == MessageEntityType.PHONE_NUMBER: user = int(context.parameter[0]) - elif context.entities[0].type == "bot_command": + elif context.entities[0].type == MessageEntityType.BOT_COMMAND: if context.from_user: user = context.from_user else: diff --git a/list.json b/list.json index dbd6071..d604a1e 100644 --- a/list.json +++ b/list.json @@ -12,7 +12,7 @@ }, { "name": "eat", - "version": "1.047", + "version": "1.048", "section": "profile", "maintainer": "SF_PICK", "size": "20.0 kb",