Fixed deprecation message

This commit is contained in:
Alex Root Junior 2022-06-26 00:38:29 +03:00
parent 4a99661b38
commit 3925b19084
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC

View file

@ -37,8 +37,8 @@ class MessageEntity(MutableTelegramObject):
def extract(self, text: str) -> str:
warnings.warn(
"Method `MessageEntity.get_text(...)` deprecated and will be removed in 3.0b5.\n"
" Use `MessageEntity.extract(...)` instead.",
"Method `MessageEntity.extract(...)` deprecated and will be removed in 3.0b5.\n"
" Use `MessageEntity.extract_from(...)` instead.",
DeprecationWarning,
)
return self.extract_from(text=text)