diff --git a/README.md b/README.md
index 5d4b24e48..6b904e298 100644
--- a/README.md
+++ b/README.md
@@ -22,12 +22,6 @@
-## WARNING
-
-We merge changes made to few of pyrogram forks plus changes made by us to this repository. All the features are just customized feature mostly for personal use; there is no guarantee in them being stable, __USE AT YOUR OWN RISK__.
-
-All of the repositories that we merge features from are listed in [Release Notes](https://telegramplayground.github.io/pyrogram/releases/changes-in-this-fork.html) file.
-
## Pyrogram
> Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots
diff --git a/compiler/docs/compiler.py b/compiler/docs/compiler.py
index 87e34a226..170d8d914 100644
--- a/compiler/docs/compiler.py
+++ b/compiler/docs/compiler.py
@@ -137,64 +137,56 @@ def get_title_list(s: str) -> list:
Utilities
start
stop
- run
restart
+ run
add_handler
remove_handler
- stop_transmission
export_session_string
+ stop_transmission
set_parse_mode
""",
- messages="""
- Messages
- send_message
- forward_messages
- copy_message
- copy_media_group
- send_photo
- send_audio
- send_document
- send_sticker
- send_video
- send_animation
- send_voice
- send_video_note
- send_media_group
- send_location
- send_venue
- send_contact
- send_cached_media
- set_reaction
- edit_message_text
- edit_message_caption
- edit_message_media
- edit_message_reply_markup
- edit_inline_text
- edit_inline_caption
- edit_inline_media
- edit_inline_reply_markup
- send_chat_action
- delete_messages
- get_messages
- get_media_group
- get_chat_history
- get_chat_history_count
- read_chat_history
- send_poll
- vote_poll
- stop_poll
- retract_vote
- send_dice
- search_messages
- search_messages_count
- search_global
- search_global_count
- download_media
- stream_media
- get_discussion_message
- get_discussion_replies
- get_discussion_replies_count
- get_custom_emoji_stickers
+ advanced="""
+ Advanced
+ invoke
+ resolve_peer
+ save_file
+ """,
+ authorization="""
+ Authorization
+ connect
+ disconnect
+ initialize
+ terminate
+ send_code
+ resend_code
+ sign_in
+ sign_in_bot
+ sign_up
+ get_password_hint
+ check_password
+ send_recovery_code
+ recover_password
+ accept_terms_of_service
+ log_out
+ """,
+ bots="""
+ Bots
+ get_inline_bot_results
+ send_inline_bot_result
+ answer_callback_query
+ answer_inline_query
+ request_callback_answer
+ send_game
+ set_game_score
+ get_game_high_scores
+ set_bot_commands
+ get_bot_commands
+ delete_bot_commands
+ set_bot_default_privileges
+ get_bot_default_privileges
+ set_chat_menu_button
+ get_chat_menu_button
+ answer_web_app_query
""",
chats="""
Chats
@@ -253,23 +245,13 @@ def get_title_list(s: str) -> list:
get_forum_topics
get_forum_topic
""",
- users="""
- Users
- get_me
- get_users
- get_chat_photos
- get_chat_photos_count
- set_profile_photo
- delete_profile_photos
- set_username
- update_profile
- block_user
- unblock_user
- get_common_chats
- get_default_emoji_statuses
- set_emoji_status
- set_birthdate
- set_personal_chat
+ contacts="""
+ Contacts
+ add_contact
+ delete_contacts
+ import_contacts
+ get_contacts
+ get_contacts_count
""",
invite_links="""
Invite Links
@@ -291,13 +273,56 @@ def get_title_list(s: str) -> list:
decline_chat_join_request
decline_all_chat_join_requests
""",
- contacts="""
- Contacts
- add_contact
- delete_contacts
- import_contacts
- get_contacts
- get_contacts_count
+ messages="""
+ Messages
+ copy_media_group
+ copy_message
+ delete_messages
+ download_media
+ edit_inline_caption
+ edit_inline_media
+ edit_inline_reply_markup
+ edit_inline_text
+ edit_message_caption
+ edit_message_media
+ edit_message_reply_markup
+ edit_message_text
+ forward_messages
+ get_chat_history
+ get_chat_history_count
+ get_custom_emoji_stickers
+ get_discussion_message
+ get_discussion_replies
+ get_discussion_replies_count
+ get_media_group
+ get_messages
+ read_chat_history
+ retract_vote
+ search_global
+ search_global_count
+ search_messages
+ search_messages_count
+ send_animation
+ send_audio
+ send_cached_media
+ send_chat_action
+ send_contact
+ send_dice
+ send_document
+ send_location
+ send_media_group
+ send_message
+ send_photo
+ send_poll
+ send_sticker
+ send_venue
+ send_video
+ send_video_note
+ send_voice
+ set_reaction
+ stop_poll
+ stream_media
+ vote_poll
""",
password="""
Password
@@ -305,53 +330,28 @@ def get_title_list(s: str) -> list:
change_cloud_password
remove_cloud_password
""",
- bots="""
- Bots
- get_inline_bot_results
- send_inline_bot_result
- answer_callback_query
- answer_inline_query
- request_callback_answer
- send_game
- set_game_score
- get_game_high_scores
- set_bot_commands
- get_bot_commands
- delete_bot_commands
- set_bot_default_privileges
- get_bot_default_privileges
- set_chat_menu_button
- get_chat_menu_button
- answer_web_app_query
+ users="""
+ Users
+ get_me
+ get_users
+ get_chat_photos
+ get_chat_photos_count
+ set_profile_photo
+ delete_profile_photos
+ set_username
+ update_profile
+ block_user
+ unblock_user
+ get_common_chats
+ get_default_emoji_statuses
+ set_emoji_status
+ set_birthdate
+ set_personal_chat
""",
business="""
Telegram Business
get_business_connection
- """,
- authorization="""
- Authorization
- connect
- disconnect
- initialize
- terminate
- send_code
- resend_code
- sign_in
- sign_in_bot
- sign_up
- get_password_hint
- check_password
- send_recovery_code
- recover_password
- accept_terms_of_service
- log_out
- """,
- advanced="""
- Advanced
- invoke
- resolve_peer
- save_file
- """
+ """,
)
root = PYROGRAM_API_DEST + "/methods"
@@ -390,165 +390,136 @@ def get_title_list(s: str) -> list:
# Types
categories = dict(
- users_chats="""
- Users & Chats
- User
- Chat
- ChatPhoto
- ChatMember
- ChatPermissions
- ChatPrivileges
- ChatInviteLink
- ChatAdminWithInviteLinks
- ChatEvent
- ChatEventFilter
- ChatMemberUpdated
- ChatJoinRequest
- ChatJoiner
- Dialog
- Restriction
- EmojiStatus
- ChatReactions
- UsersShared
- ChatShared
- Birthdate
- Username
- ChatColor
+ authorization="""
+ Authorization
+ SentCode
+ TermsOfService
""",
- messages_media="""
- Messages & Media
- Message
- MessageEntity
- Photo
- Thumbnail
- Audio
- Document
- Animation
- Video
- Voice
- VideoNote
- Contact
- Location
- Venue
- Sticker
- Game
- WebPage
- Poll
- PollOption
- Dice
- Reaction
- ReactionType
- ReactionTypeEmoji
- ReactionTypeCustomEmoji
- VideoChatScheduled
- VideoChatStarted
- VideoChatEnded
- VideoChatParticipantsInvited
- WebAppData
- MessageReactions
- MessageReactionUpdated
- MessageReactionCountUpdated
- ReactionCount
- ChatBoostAdded
- Story
- GiveawayCreated
- Giveaway
- GiveawayWinners
- GiveawayCompleted
- GiftCode
+ bot_commands="""
+ Bot Commands
+ BotCommand
+ BotCommandScope
+ BotCommandScopeAllChatAdministrators
+ BotCommandScopeAllGroupChats
+ BotCommandScopeAllPrivateChats
+ BotCommandScopeChat
+ BotCommandScopeChatAdministrators
+ BotCommandScopeChatMember
+ BotCommandScopeDefault
""",
bot_keyboards="""
Bot keyboards
- ReplyKeyboardMarkup
+ CallbackGame
+ CallbackQuery
+ ForceReply
+ GameHighScore
+ InlineKeyboardButton
+ InlineKeyboardMarkup
KeyboardButton
+ KeyboardButtonPollType
+ KeyboardButtonPollTypeRegular
+ KeyboardButtonPollTypeQuiz
+ KeyboardButtonRequestChat
+ KeyboardButtonRequestUsers
+ ReplyKeyboardMarkup
ReplyKeyboardRemove
- InlineKeyboardMarkup
- InlineKeyboardButton
LoginUrl
- ForceReply
- CallbackQuery
- GameHighScore
- CallbackGame
WebAppInfo
MenuButton
MenuButtonCommands
MenuButtonWebApp
MenuButtonDefault
SentWebAppMessage
- KeyboardButtonPollType
- KeyboardButtonPollTypeRegular
- KeyboardButtonPollTypeQuiz
SwitchInlineQueryChosenChat
- KeyboardButtonRequestUsers
- KeyboardButtonRequestChat
""",
- bot_commands="""
- Bot commands
- BotCommand
- BotCommandScope
- BotCommandScopeDefault
- BotCommandScopeAllPrivateChats
- BotCommandScopeAllGroupChats
- BotCommandScopeAllChatAdministrators
- BotCommandScopeChat
- BotCommandScopeChatAdministrators
- BotCommandScopeChatMember
- """,
- input_media="""
- Input Media
- InputMedia
- InputMediaPhoto
- InputMediaVideo
- InputMediaAudio
- InputMediaAnimation
- InputMediaDocument
- InputPhoneContact
- LinkPreviewOptions
+ chat_topics="""
+ Chat Forum Topics
+ ForumTopic
+ ForumTopicClosed
+ ForumTopicCreated
+ ForumTopicEdited
+ ForumTopicReopened
+ GeneralForumTopicHidden
+ GeneralForumTopicUnhidden
""",
inline_mode="""
Inline Mode
+ ChosenInlineResult
InlineQuery
InlineQueryResult
+ InlineQueryResultCachedAnimation
InlineQueryResultCachedAudio
InlineQueryResultCachedDocument
- InlineQueryResultCachedAnimation
InlineQueryResultCachedPhoto
InlineQueryResultCachedSticker
InlineQueryResultCachedVideo
InlineQueryResultCachedVoice
- InlineQueryResultArticle
+ InlineQueryResultAnimation
InlineQueryResultAudio
- InlineQueryResultContact
InlineQueryResultDocument
- InlineQueryResultAnimation
- InlineQueryResultLocation
InlineQueryResultPhoto
- InlineQueryResultVenue
InlineQueryResultVideo
InlineQueryResultVoice
- ChosenInlineResult
+ InlineQueryResultArticle
+ InlineQueryResultContact
+ InlineQueryResultLocation
+ InlineQueryResultVenue
+ """,
+ input_media="""
+ Input Media
+ InputMedia
+ InputMediaPhoto
+ InputMediaVideo
+ InputMediaAudio
+ InputMediaAnimation
+ InputMediaDocument
+ InputPhoneContact
+ LinkPreviewOptions
""",
input_message_content="""
InputMessageContent
+ ExternalReplyInfo
InputMessageContent
InputTextMessageContent
- ExternalReplyInfo
ReplyParameters
""",
- authorization="""
- Authorization
- SentCode
- TermsOfService
- """,
- chat_topics="""
- Chat Forum Topics
- ForumTopicCreated
- ForumTopicClosed
- ForumTopicEdited
- ForumTopicReopened
- GeneralForumTopicHidden
- GeneralForumTopicUnhidden
- ForumTopic
+ messages_media="""
+ Messages & Media
+ Animation
+ Audio
+ ChatBoostAdded
+ Contact
+ Dice
+ Document
+ Game
+ GiftCode
+ Giveaway
+ GiveawayCompleted
+ GiveawayWinners
+ Location
+ Message
+ MessageEntity
+ MessageReactionCountUpdated
+ MessageReactionUpdated
+ MessageReactions
+ Photo
+ Reaction
+ ReactionCount
+ ReactionType
+ ReactionTypeEmoji
+ ReactionTypeCustomEmoji
+ Thumbnail
+ StrippedThumbnail
+ Poll
+ PollOption
+ Sticker
+ Story
+ Venue
+ Video
+ VideoNote
+ Voice
+ WebAppData
+ WebPage
""",
business="""
Telegram Business
@@ -558,6 +529,36 @@ def get_title_list(s: str) -> list:
BusinessOpeningHours
BusinessOpeningHoursInterval
""",
+ users_chats="""
+ Users & Chats
+ Birthdate
+ Chat
+ ChatAdminWithInviteLinks
+ ChatColor
+ ChatEvent
+ ChatEventFilter
+ ChatInviteLink
+ ChatJoiner
+ ChatJoinRequest
+ ChatMember
+ ChatMemberUpdated
+ ChatPermissions
+ ChatPhoto
+ ChatPrivileges
+ ChatReactions
+ ChatShared
+ Dialog
+ EmojiStatus
+ InviteLinkImporter
+ Restriction
+ User
+ Username
+ UsersShared
+ VideoChatEnded
+ VideoChatParticipantsInvited
+ VideoChatScheduled
+ VideoChatStarted
+ """,
)
root = PYROGRAM_API_DEST + "/types"
diff --git a/docs/source/index.rst b/docs/source/index.rst
index aa6bd05f3..2b216bed5 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -1,6 +1,12 @@
Welcome to Pyrogram
===================
+.. admonition :: A Word of Warning
+ :class: tip
+
+ We merge changes made to few of pyrogram forks plus changes made by us to this repository. All the features are just customized feature mostly for personal use; there is no guarantee in them being stable, __USE AT YOUR OWN RISK__.
+
+
.. raw:: html
@@ -49,11 +55,6 @@ Welcome to Pyrogram
It enables you to easily interact with the main Telegram API through a user account (custom client) or a bot identity
(bot API alternative) using Python.
-.. admonition :: A Word of Warning
- :class: tip
-
- We merge changes made to few of pyrogram forks plus changes made by us to this repository. All the features are just customized feature mostly for personal use; there is no guarantee in them being stable.
-
.. admonition :: USE AT YOUR OWN RISK
:class: tip
diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py
index 0fc92413e..fde428037 100644
--- a/pyrogram/__init__.py
+++ b/pyrogram/__init__.py
@@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see .
-__version__ = "2.1.18"
+__version__ = "2.1.19"
__license__ = "GNU Lesser General Public License v3.0 (LGPL-3.0)"
__copyright__ = "Copyright (C) 2017-present Dan "
diff --git a/pyrogram/methods/__init__.py b/pyrogram/methods/__init__.py
index 12bf462e4..30dbf67d0 100644
--- a/pyrogram/methods/__init__.py
+++ b/pyrogram/methods/__init__.py
@@ -32,18 +32,18 @@
class Methods(
+ Decorators,
Advanced,
Auth,
Bots,
+ Chats,
+ ChatTopics,
Contacts,
+ InviteLinks,
+ Messages,
Password,
- Chats,
+ TelegramBusiness,
Users,
- Messages,
- Decorators,
Utilities,
- InviteLinks,
- ChatTopics,
- TelegramBusiness,
):
pass
diff --git a/pyrogram/methods/bots/__init__.py b/pyrogram/methods/bots/__init__.py
index da52fcfb0..8198ed8fe 100644
--- a/pyrogram/methods/bots/__init__.py
+++ b/pyrogram/methods/bots/__init__.py
@@ -37,6 +37,7 @@
class Bots(
AnswerCallbackQuery,
AnswerInlineQuery,
+ AnswerWebAppQuery,
GetInlineBotResults,
RequestCallbackAnswer,
SendInlineBotResult,
@@ -50,6 +51,5 @@ class Bots(
GetBotDefaultPrivileges,
SetChatMenuButton,
GetChatMenuButton,
- AnswerWebAppQuery
):
pass
diff --git a/pyrogram/methods/chat_topics/__init__.py b/pyrogram/methods/chat_topics/__init__.py
index e46d1593a..4fbc67e29 100644
--- a/pyrogram/methods/chat_topics/__init__.py
+++ b/pyrogram/methods/chat_topics/__init__.py
@@ -29,15 +29,15 @@
class ChatTopics(
- GetForumTopicIconStickers,
+ CloseForumTopic,
CreateForumTopic,
+ DeleteForumTopic,
EditForumTopic,
- CloseForumTopic,
- ReopenForumTopic,
+ GetForumTopic,
+ GetForumTopicIconStickers,
+ GetForumTopics,
HideForumTopic,
+ ReopenForumTopic,
UnhideForumTopic,
- DeleteForumTopic,
- GetForumTopics,
- GetForumTopic,
):
pass
diff --git a/pyrogram/methods/contacts/__init__.py b/pyrogram/methods/contacts/__init__.py
index 5849ce438..d3fd27465 100644
--- a/pyrogram/methods/contacts/__init__.py
+++ b/pyrogram/methods/contacts/__init__.py
@@ -24,10 +24,10 @@
class Contacts(
- GetContacts,
+ AddContact,
DeleteContacts,
- ImportContacts,
+ GetContacts,
GetContactsCount,
- AddContact
+ ImportContacts,
):
pass
diff --git a/pyrogram/methods/decorators/__init__.py b/pyrogram/methods/decorators/__init__.py
index 2bd17ac1c..d7ab7bcb4 100644
--- a/pyrogram/methods/decorators/__init__.py
+++ b/pyrogram/methods/decorators/__init__.py
@@ -36,16 +36,21 @@ class Decorators(
OnMessage,
OnEditedMessage,
OnDeletedMessages,
- OnCallbackQuery,
- OnRawUpdate,
- OnDisconnect,
- OnUserStatus,
+ OnMessageReactionUpdated,
+ OnMessageReactionCountUpdated,
OnInlineQuery,
- OnPoll,
OnChosenInlineResult,
+ OnCallbackQuery,
+
+
+ OnPoll,
+
OnChatMemberUpdated,
OnChatJoinRequest,
- OnMessageReactionUpdated,
- OnMessageReactionCountUpdated
+
+
+ OnDisconnect,
+ OnUserStatus,
+ OnRawUpdate,
):
pass
diff --git a/pyrogram/methods/invite_links/__init__.py b/pyrogram/methods/invite_links/__init__.py
index 67c1d1495..51145dcfa 100644
--- a/pyrogram/methods/invite_links/__init__.py
+++ b/pyrogram/methods/invite_links/__init__.py
@@ -37,22 +37,22 @@
class InviteLinks(
- RevokeChatInviteLink,
+ ApproveAllChatJoinRequests,
+ ApproveChatJoinRequest,
+ CreateChatInviteLink,
+ DeclineAllChatJoinRequests,
+ DeclineChatJoinRequest,
+ DeleteChatAdminInviteLinks,
DeleteChatInviteLink,
EditChatInviteLink,
- CreateChatInviteLink,
- GetChatInviteLinkJoiners,
- GetChatInviteLinkJoinersCount,
- GetChatAdminInviteLinks,
ExportChatInviteLink,
- DeleteChatAdminInviteLinks,
+ GetChatAdminInviteLinks,
GetChatAdminInviteLinksCount,
GetChatAdminsWithInviteLinks,
GetChatInviteLink,
- ApproveChatJoinRequest,
- DeclineChatJoinRequest,
- ApproveAllChatJoinRequests,
- DeclineAllChatJoinRequests,
- GetChatJoinRequests
+ GetChatInviteLinkJoiners,
+ GetChatInviteLinkJoinersCount,
+ GetChatJoinRequests,
+ RevokeChatInviteLink,
):
pass
diff --git a/pyrogram/methods/messages/__init__.py b/pyrogram/methods/messages/__init__.py
index cdd5bf25c..8fc44b763 100644
--- a/pyrogram/methods/messages/__init__.py
+++ b/pyrogram/methods/messages/__init__.py
@@ -69,53 +69,53 @@
class Messages(
+ CopyMediaGroup,
+ CopyMessage,
DeleteMessages,
+ DownloadMedia,
+ EditInlineCaption,
+ EditInlineMedia,
+ EditInlineReplyMarkup,
+ EditInlineText,
EditMessageCaption,
- EditMessageReplyMarkup,
EditMessageMedia,
+ EditMessageReplyMarkup,
EditMessageText,
ForwardMessages,
+ GetChatHistory,
+ GetChatHistoryCount,
+ GetCustomEmojiStickers,
+ GetDiscussionMessage,
+ GetDiscussionReplies,
+ GetDiscussionRepliesCount,
GetMediaGroup,
GetMessages,
+ ReadChatHistory,
+ RetractVote,
+ SearchGlobal,
+ SearchGlobalCount,
+ SearchMessages,
+ SearchMessagesCount,
+ SendAnimation,
SendAudio,
+ SendCachedMedia,
SendChatAction,
SendContact,
+ SendDice,
SendDocument,
- SendAnimation,
SendLocation,
SendMediaGroup,
SendMessage,
SendPhoto,
+ SendPoll,
SendSticker,
SendVenue,
SendVideo,
SendVideoNote,
SendVoice,
- SendPoll,
- VotePoll,
- StopPoll,
- RetractVote,
- DownloadMedia,
- GetChatHistory,
- SendCachedMedia,
- GetChatHistoryCount,
- ReadChatHistory,
- EditInlineText,
- EditInlineCaption,
- EditInlineMedia,
- EditInlineReplyMarkup,
- SendDice,
- SearchMessages,
- SearchGlobal,
- CopyMessage,
- CopyMediaGroup,
- SearchMessagesCount,
- SearchGlobalCount,
- GetDiscussionMessage,
SetReaction,
- GetDiscussionReplies,
- GetDiscussionRepliesCount,
+ StopPoll,
StreamMedia,
- GetCustomEmojiStickers
+ VotePoll,
):
pass
diff --git a/pyrogram/methods/password/__init__.py b/pyrogram/methods/password/__init__.py
index e8d42926a..dd204aac9 100644
--- a/pyrogram/methods/password/__init__.py
+++ b/pyrogram/methods/password/__init__.py
@@ -22,8 +22,8 @@
class Password(
- RemoveCloudPassword,
ChangeCloudPassword,
- EnableCloudPassword
+ EnableCloudPassword,
+ RemoveCloudPassword,
):
pass
diff --git a/pyrogram/methods/users/__init__.py b/pyrogram/methods/users/__init__.py
index 152d3a3b6..9a5be5428 100644
--- a/pyrogram/methods/users/__init__.py
+++ b/pyrogram/methods/users/__init__.py
@@ -35,19 +35,19 @@
class Users(
BlockUser,
- GetCommonChats,
- GetChatPhotos,
- SetProfilePhoto,
DeleteProfilePhotos,
- GetUsers,
+ GetChatPhotos,
+ GetChatPhotosCount,
+ GetCommonChats,
+ GetDefaultEmojiStatuses,
GetMe,
+ GetUsers,
+ SetBirthdate,
+ SetEmojiStatus,
+ SetPersonalChat,
+ SetProfilePhoto,
SetUsername,
- GetChatPhotosCount,
UnblockUser,
UpdateProfile,
- GetDefaultEmojiStatuses,
- SetEmojiStatus,
- SetBirthdate,
- SetPersonalChat
):
pass
diff --git a/pyrogram/types/__init__.py b/pyrogram/types/__init__.py
index a831172a8..da85b9812 100644
--- a/pyrogram/types/__init__.py
+++ b/pyrogram/types/__init__.py
@@ -16,15 +16,15 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see .
+from .object import Object
+from .list import List
+from .update import *
from .authorization import *
from .bots_and_keyboards import *
+from .chat_topics import *
from .inline_mode import *
from .input_media import *
from .input_message_content import *
-from .list import List
from .messages_and_media import *
-from .object import Object
-from .update import *
-from .user_and_chats import *
-from .chat_topics import *
from .business import *
+from .user_and_chats import *
diff --git a/pyrogram/types/authorization/__init__.py b/pyrogram/types/authorization/__init__.py
index b31ad26a5..382e16109 100644
--- a/pyrogram/types/authorization/__init__.py
+++ b/pyrogram/types/authorization/__init__.py
@@ -19,4 +19,7 @@
from .sent_code import SentCode
from .terms_of_service import TermsOfService
-__all__ = ["TermsOfService", "SentCode"]
+__all__ = [
+ "SentCode",
+ "TermsOfService",
+]
diff --git a/pyrogram/types/bots_and_keyboards/__init__.py b/pyrogram/types/bots_and_keyboards/__init__.py
index c0059a827..151d1ee98 100644
--- a/pyrogram/types/bots_and_keyboards/__init__.py
+++ b/pyrogram/types/bots_and_keyboards/__init__.py
@@ -37,6 +37,8 @@
KeyboardButtonPollTypeRegular,
KeyboardButtonPollTypeQuiz
)
+from .keyboard_button_request_chat import KeyboardButtonRequestChat
+from .keyboard_button_request_users import KeyboardButtonRequestUsers
from .login_url import LoginUrl
from .menu_button import MenuButton
from .menu_button_commands import MenuButtonCommands
@@ -45,10 +47,9 @@
from .reply_keyboard_markup import ReplyKeyboardMarkup
from .reply_keyboard_remove import ReplyKeyboardRemove
from .sent_web_app_message import SentWebAppMessage
-from .web_app_info import WebAppInfo
from .switch_inline_query_chosen_chat import SwitchInlineQueryChosenChat
-from .keyboard_button_request_users import KeyboardButtonRequestUsers
-from .keyboard_button_request_chat import KeyboardButtonRequestChat
+from .web_app_info import WebAppInfo
+
__all__ = [
"CallbackGame",
@@ -61,6 +62,8 @@
"KeyboardButtonPollType",
"KeyboardButtonPollTypeRegular",
"KeyboardButtonPollTypeQuiz",
+ "KeyboardButtonRequestChat",
+ "KeyboardButtonRequestUsers",
"ReplyKeyboardMarkup",
"ReplyKeyboardRemove",
"LoginUrl",
@@ -80,6 +83,4 @@
"MenuButtonDefault",
"SentWebAppMessage",
"SwitchInlineQueryChosenChat",
- "KeyboardButtonRequestUsers",
- "KeyboardButtonRequestChat"
]
diff --git a/pyrogram/types/chat_topics/__init__.py b/pyrogram/types/chat_topics/__init__.py
index a2b453fa2..554635228 100644
--- a/pyrogram/types/chat_topics/__init__.py
+++ b/pyrogram/types/chat_topics/__init__.py
@@ -25,11 +25,11 @@
from .forum_topic import ForumTopic
__all__ = [
- "ForumTopicCreated",
+ "ForumTopic",
"ForumTopicClosed",
+ "ForumTopicCreated",
"ForumTopicEdited",
"ForumTopicReopened",
"GeneralForumTopicHidden",
"GeneralForumTopicUnhidden",
- "ForumTopic",
]
diff --git a/pyrogram/types/inline_mode/__init__.py b/pyrogram/types/inline_mode/__init__.py
index f7323abf9..53e883ce9 100644
--- a/pyrogram/types/inline_mode/__init__.py
+++ b/pyrogram/types/inline_mode/__init__.py
@@ -38,10 +38,24 @@
from .inline_query_result_cached_audio import InlineQueryResultCachedAudio
__all__ = [
- "InlineQuery", "InlineQueryResult", "InlineQueryResultArticle", "InlineQueryResultPhoto",
- "InlineQueryResultAnimation", "InlineQueryResultAudio", "InlineQueryResultVideo", "ChosenInlineResult",
- "InlineQueryResultContact", "InlineQueryResultDocument", "InlineQueryResultVoice", "InlineQueryResultLocation",
- "InlineQueryResultVenue", "InlineQueryResultCachedPhoto", "InlineQueryResultCachedAnimation",
- "InlineQueryResultCachedSticker", "InlineQueryResultCachedDocument", "InlineQueryResultCachedVideo",
- "InlineQueryResultCachedVoice", "InlineQueryResultCachedAudio"
+ "ChosenInlineResult",
+ "InlineQuery",
+ "InlineQueryResult",
+ "InlineQueryResultCachedAnimation",
+ "InlineQueryResultCachedAudio",
+ "InlineQueryResultCachedDocument",
+ "InlineQueryResultCachedPhoto",
+ "InlineQueryResultCachedSticker",
+ "InlineQueryResultCachedVideo",
+ "InlineQueryResultCachedVoice",
+ "InlineQueryResultAnimation",
+ "InlineQueryResultAudio",
+ "InlineQueryResultDocument",
+ "InlineQueryResultPhoto",
+ "InlineQueryResultVideo",
+ "InlineQueryResultVoice",
+ "InlineQueryResultArticle",
+ "InlineQueryResultContact",
+ "InlineQueryResultLocation",
+ "InlineQueryResultVenue",
]
diff --git a/pyrogram/types/input_media/__init__.py b/pyrogram/types/input_media/__init__.py
index 35da42769..56b3f7148 100644
--- a/pyrogram/types/input_media/__init__.py
+++ b/pyrogram/types/input_media/__init__.py
@@ -26,6 +26,7 @@
from .link_preview_options import LinkPreviewOptions
__all__ = [
+ "LinkPreviewOptions",
"InputMedia",
"InputMediaAnimation",
"InputMediaAudio",
@@ -33,5 +34,4 @@
"InputMediaPhoto",
"InputMediaVideo",
"InputPhoneContact",
- "LinkPreviewOptions"
]
diff --git a/pyrogram/types/input_message_content/__init__.py b/pyrogram/types/input_message_content/__init__.py
index 19aabc94d..3accd6f9f 100644
--- a/pyrogram/types/input_message_content/__init__.py
+++ b/pyrogram/types/input_message_content/__init__.py
@@ -22,8 +22,8 @@
from .external_reply_info import ExternalReplyInfo
__all__ = [
+ "ExternalReplyInfo",
"InputMessageContent",
"InputTextMessageContent",
"ReplyParameters",
- "ExternalReplyInfo"
]
diff --git a/pyrogram/types/messages_and_media/__init__.py b/pyrogram/types/messages_and_media/__init__.py
index ba6aaf9dc..c07bad8c0 100644
--- a/pyrogram/types/messages_and_media/__init__.py
+++ b/pyrogram/types/messages_and_media/__init__.py
@@ -57,37 +57,37 @@
__all__ = [
"Animation",
"Audio",
+ "ChatBoostAdded",
"Contact",
+ "Dice",
"Document",
"Game",
+ "GiftCode",
"Giveaway",
"GiveawayCompleted",
"GiveawayWinners",
"Location",
"Message",
"MessageEntity",
+ "MessageReactionCountUpdated",
+ "MessageReactionUpdated",
+ "MessageReactions",
"Photo",
+ "Reaction",
+ "ReactionCount",
+ "ReactionType",
+ "ReactionTypeEmoji",
+ "ReactionTypeCustomEmoji",
"Thumbnail",
"StrippedThumbnail",
"Poll",
"PollOption",
"Sticker",
+ "Story",
"Venue",
"Video",
"VideoNote",
"Voice",
- "WebPage",
- "Dice",
"WebAppData",
- "Reaction",
- "MessageReactions",
- "ReactionCount",
- "ReactionType",
- "ReactionTypeEmoji",
- "ReactionTypeCustomEmoji",
- "MessageReactionUpdated",
- "MessageReactionCountUpdated",
- "ChatBoostAdded",
- "Story",
- "GiftCode"
+ "WebPage",
]
diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py
index d8969c252..83e781ea4 100644
--- a/pyrogram/types/messages_and_media/message.py
+++ b/pyrogram/types/messages_and_media/message.py
@@ -1338,8 +1338,6 @@ async def reply_text(
link_preview_options: "types.LinkPreviewOptions" = None,
disable_notification: bool = None,
protect_content: bool = None,
- message_thread_id: int = None,
- business_connection_id: str = None,
reply_parameters: "types.ReplyParameters" = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@@ -1396,12 +1394,6 @@ async def reply_text(
protect_content (``bool``, *optional*):
Protects the contents of the sent message from forwarding and saving.
- message_thread_id (``int``, *optional*):
- If the message is in a thread, ID of the original message.
-
- business_connection_id (``str``, *optional*):
- Unique identifier of the business connection on behalf of which the message will be sent.
-
reply_parameters (:obj:`~pyrogram.types.ReplyParameters`, *optional*):
Description of the message to reply to
@@ -1434,8 +1426,8 @@ async def reply_text(
link_preview_options=link_preview_options,
disable_notification=disable_notification,
protect_content=protect_content,
- message_thread_id=message_thread_id,
- business_connection_id=business_connection_id,
+ message_thread_id=self.message_thread_id,
+ business_connection_id=self.business_connection_id,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
schedule_date=schedule_date
@@ -1459,8 +1451,6 @@ async def reply_animation(
file_name: str = None,
disable_notification: bool = None,
reply_parameters: "types.ReplyParameters" = None,
- message_thread_id: int = None,
- business_connection_id: str = None,
schedule_date: datetime = None,
protect_content: bool = None,
ttl_seconds: int = None,
@@ -1544,12 +1534,6 @@ async def reply_animation(
reply_parameters (:obj:`~pyrogram.types.ReplyParameters`, *optional*):
Description of the message to reply to
- message_thread_id (``int``, *optional*):
- If the message is in a thread, ID of the original message.
-
- business_connection_id (``str``, *optional*):
- Unique identifier of the business connection on behalf of which the message will be sent.
-
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
Date when the message will be automatically sent.
@@ -1618,8 +1602,8 @@ async def reply_animation(
file_name=file_name,
disable_notification=disable_notification,
reply_parameters=reply_parameters,
- message_thread_id=message_thread_id,
- business_connection_id=business_connection_id,
+ message_thread_id=self.message_thread_id,
+ business_connection_id=self.business_connection_id,
schedule_date=schedule_date,
protect_content=protect_content,
ttl_seconds=ttl_seconds,
@@ -1642,8 +1626,6 @@ async def reply_audio(
file_name: str = None,
disable_notification: bool = None,
reply_parameters: "types.ReplyParameters" = None,
- message_thread_id: int = None,
- business_connection_id: str = None,
schedule_date: datetime = None,
protect_content: bool = None,
reply_markup: Union[
@@ -1719,12 +1701,6 @@ async def reply_audio(
reply_parameters (:obj:`~pyrogram.types.ReplyParameters`, *optional*):
Description of the message to reply to
- message_thread_id (``int``, *optional*):
- If the message is in a thread, ID of the original message.
-
- business_connection_id (``str``, *optional*):
- Unique identifier of the business connection on behalf of which the message will be sent.
-
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
Date when the message will be automatically sent.
@@ -1786,8 +1762,8 @@ async def reply_audio(
file_name=file_name,
disable_notification=disable_notification,
reply_parameters=reply_parameters,
- message_thread_id=message_thread_id,
- business_connection_id=business_connection_id,
+ message_thread_id=self.message_thread_id,
+ business_connection_id=self.business_connection_id,
schedule_date=schedule_date,
protect_content=protect_content,
reply_markup=reply_markup,
@@ -1804,11 +1780,7 @@ async def reply_cached_media(
caption_entities: List["types.MessageEntity"] = None,
disable_notification: bool = None,
reply_parameters: "types.ReplyParameters" = None,
- message_thread_id: int = None,
- business_connection_id: str = None,
schedule_date: datetime = None,
- protect_content: bool = None,
- has_spoiler: bool = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
"types.ReplyKeyboardMarkup",
@@ -1859,20 +1831,8 @@ async def reply_cached_media(
reply_parameters (:obj:`~pyrogram.types.ReplyParameters`, *optional*):
Description of the message to reply to
- message_thread_id (``int``, *optional*):
- If the message is in a thread, ID of the original message.
-
- business_connection_id (``str``, *optional*):
- Unique identifier of the business connection on behalf of which the message will be sent.
-
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
Date when the message will be automatically sent.
-
- protect_content (``bool``, *optional*):
- Protects the contents of the sent message from forwarding and saving.
-
- has_spoiler (``bool``, *optional*):
- True, if the message media is covered by a spoiler animation.
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardMarkup` | :obj:`~pyrogram.types.ReplyKeyboardRemove` | :obj:`~pyrogram.types.ForceReply`, *optional*):
Additional interface options. An object for an inline keyboard, custom reply keyboard,
@@ -1900,20 +1860,18 @@ async def reply_cached_media(
caption_entities=caption_entities,
disable_notification=disable_notification,
reply_parameters=reply_parameters,
- message_thread_id=message_thread_id,
- business_connection_id=business_connection_id,
+ message_thread_id=self.message_thread_id,
+ business_connection_id=self.business_connection_id,
schedule_date=schedule_date,
- protect_content=protect_content,
- has_spoiler=has_spoiler,
+ protect_content=self.has_protected_content,
+ has_spoiler=self.has_media_spoiler,
reply_markup=reply_markup
)
async def reply_chat_action(
self,
action: "enums.ChatAction",
- progress: int = 0,
- message_thread_id: int = None,
- business_connection_id: str = None
+ progress: int = 0
) -> bool:
"""Bound method *reply_chat_action* of :obj:`~pyrogram.types.Message`.
@@ -1942,12 +1900,6 @@ async def reply_chat_action(
progress (``int``, *optional*):
Upload progress, as a percentage.
- message_thread_id (``int``, *optional*):
- Unique identifier for the target message thread; for supergroups only
-
- business_connection_id (``str``, *optional*):
- Unique identifier of the business connection on behalf of which the action will be sent
-
Returns:
``bool``: On success, True is returned.
@@ -1959,8 +1911,8 @@ async def reply_chat_action(
chat_id=self.chat.id,
action=action,
progress=progress,
- message_thread_id=message_thread_id,
- business_connection_id=business_connection_id
+ message_thread_id=self.message_thread_id,
+ business_connection_id=self.business_connection_id
)
async def reply_contact(
@@ -1972,8 +1924,6 @@ async def reply_contact(
vcard: str = "",
disable_notification: bool = None,
reply_parameters: "types.ReplyParameters" = None,
- message_thread_id: int = None,
- business_connection_id: str = None,
schedule_date: datetime = None,
protect_content: bool = None,
reply_markup: Union[
@@ -2025,12 +1975,6 @@ async def reply_contact(
reply_parameters (:obj:`~pyrogram.types.ReplyParameters`, *optional*):
Description of the message to reply to
- message_thread_id (``int``, *optional*):
- If the message is in a thread, ID of the original message.
-
- business_connection_id (``str``, *optional*):
- Unique identifier of the business connection on behalf of which the message will be sent.
-
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
Date when the message will be automatically sent.
@@ -2063,8 +2007,8 @@ async def reply_contact(
vcard=vcard,
disable_notification=disable_notification,
reply_parameters=reply_parameters,
- message_thread_id=message_thread_id,
- business_connection_id=business_connection_id,
+ message_thread_id=self.message_thread_id,
+ business_connection_id=self.business_connection_id,
schedule_date=schedule_date,
protect_content=protect_content,
reply_markup=reply_markup
@@ -2082,8 +2026,6 @@ async def reply_document(
disable_content_type_detection: bool = None,
disable_notification: bool = None,
reply_parameters: "types.ReplyParameters" = None,
- message_thread_id: int = None,
- business_connection_id: str = None,
schedule_date: datetime = None,
protect_content: bool = None,
reply_markup: Union[
@@ -2156,12 +2098,6 @@ async def reply_document(
reply_parameters (:obj:`~pyrogram.types.ReplyParameters`, *optional*):
Description of the message to reply to
- message_thread_id (``int``, *optional*):
- If the message is in a thread, ID of the original message.
-
- business_connection_id (``str``, *optional*):
- Unique identifier of the business connection on behalf of which the message will be sent.
-
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
Date when the message will be automatically sent.
@@ -2221,8 +2157,8 @@ async def reply_document(
disable_content_type_detection=disable_content_type_detection,
disable_notification=disable_notification,
reply_parameters=reply_parameters,
- message_thread_id=message_thread_id,
- business_connection_id=business_connection_id,
+ message_thread_id=self.message_thread_id,
+ business_connection_id=self.business_connection_id,
schedule_date=schedule_date,
protect_content=protect_content,
reply_markup=reply_markup,
@@ -2236,8 +2172,6 @@ async def reply_game(
quote: bool = None,
disable_notification: bool = None,
protect_content: bool = None,
- message_thread_id: int = None,
- business_connection_id: str = None,
reply_parameters: "types.ReplyParameters" = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@@ -2281,12 +2215,6 @@ async def reply_game(
protect_content (``bool``, *optional*):
Protects the contents of the sent message from forwarding and saving.
- message_thread_id (``int``, *optional*):
- If the message is in a thread, ID of the original message.
-
- business_connection_id (``str``, *optional*):
- Unique identifier of the business connection on behalf of which the message will be sent.
-
reply_markup (:obj:`~pyrogram.types.InlineKeyboardMarkup`, *optional*):
An object for an inline keyboard. If empty, one ‘Play game_title’ button will be shown automatically.
If not empty, the first button must launch the game.
@@ -2311,8 +2239,8 @@ async def reply_game(
disable_notification=disable_notification,
reply_parameters=reply_parameters,
protect_content=protect_content,
- message_thread_id=message_thread_id,
- business_connection_id=business_connection_id,
+ message_thread_id=self.message_thread_id,
+ business_connection_id=self.business_connection_id,
reply_markup=reply_markup
)
@@ -2389,8 +2317,6 @@ async def reply_location(
quote: bool = None,
disable_notification: bool = None,
reply_parameters: "types.ReplyParameters" = None,
- message_thread_id: int = None,
- business_connection_id: str = None,
schedule_date: datetime = None,
protect_content: bool = None,
reply_markup: Union[
@@ -2436,12 +2362,6 @@ async def reply_location(
reply_parameters (:obj:`~pyrogram.types.ReplyParameters`, *optional*):
Description of the message to reply to
- message_thread_id (``int``, *optional*):
- If the message is in a thread, ID of the original message.
-
- business_connection_id (``str``, *optional*):
- Unique identifier of the business connection on behalf of which the message will be sent.
-
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
Date when the message will be automatically sent.
@@ -2472,8 +2392,8 @@ async def reply_location(
longitude=longitude,
disable_notification=disable_notification,
reply_parameters=reply_parameters,
- message_thread_id=message_thread_id,
- business_connection_id=business_connection_id,
+ message_thread_id=self.message_thread_id,
+ business_connection_id=self.business_connection_id,
schedule_date=schedule_date,
protect_content=protect_content,
reply_markup=reply_markup
@@ -2485,8 +2405,6 @@ async def reply_media_group(
quote: bool = None,
disable_notification: bool = None,
reply_parameters: "types.ReplyParameters" = None,
- message_thread_id: int = None,
- business_connection_id: str = None,
schedule_date: datetime = None,
protect_content: bool = None,
) -> List["types.Message"]:
@@ -2524,12 +2442,6 @@ async def reply_media_group(
reply_parameters (:obj:`~pyrogram.types.ReplyParameters`, *optional*):
Description of the message to reply to
- message_thread_id (``int``, *optional*):
- If the message is in a thread, ID of the original message.
-
- business_connection_id (``str``, *optional*):
- Unique identifier of the business connection on behalf of which the message will be sent.
-
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
Date when the message will be automatically sent.
@@ -2556,8 +2468,8 @@ async def reply_media_group(
media=media,
disable_notification=disable_notification,
reply_parameters=reply_parameters,
- message_thread_id=message_thread_id,
- business_connection_id=business_connection_id,
+ message_thread_id=self.message_thread_id,
+ business_connection_id=self.business_connection_id,
schedule_date=schedule_date,
protect_content=protect_content
)
@@ -2573,8 +2485,6 @@ async def reply_photo(
ttl_seconds: int = None,
disable_notification: bool = None,
reply_parameters: "types.ReplyParameters" = None,
- message_thread_id: int = None,
- business_connection_id: str = None,
schedule_date: datetime = None,
protect_content: bool = None,
view_once: bool = None,
@@ -2640,12 +2550,6 @@ async def reply_photo(
reply_parameters (:obj:`~pyrogram.types.ReplyParameters`, *optional*):
Description of the message to reply to
- message_thread_id (``int``, *optional*):
- If the message is in a thread, ID of the original message.
-
- business_connection_id (``str``, *optional*):
- Unique identifier of the business connection on behalf of which the message will be sent.
-
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
Date when the message will be automatically sent.
@@ -2707,8 +2611,8 @@ async def reply_photo(
ttl_seconds=ttl_seconds,
disable_notification=disable_notification,
reply_parameters=reply_parameters,
- message_thread_id=message_thread_id,
- business_connection_id=business_connection_id,
+ message_thread_id=self.message_thread_id,
+ business_connection_id=self.business_connection_id,
schedule_date=schedule_date,
protect_content=protect_content,
view_once=view_once,
@@ -2735,8 +2639,6 @@ async def reply_poll(
disable_notification: bool = None,
protect_content: bool = None,
reply_parameters: "types.ReplyParameters" = None,
- message_thread_id: int = None,
- business_connection_id: str = None,
schedule_date: datetime = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@@ -2824,12 +2726,6 @@ async def reply_poll(
reply_parameters (:obj:`~pyrogram.types.ReplyParameters`, *optional*):
Description of the message to reply to
- message_thread_id (``int``, *optional*):
- If the message is in a thread, ID of the original message.
-
- business_connection_id (``str``, *optional*):
- Unique identifier of the business connection on behalf of which the message will be sent.
-
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
Date when the message will be automatically sent.
@@ -2868,8 +2764,8 @@ async def reply_poll(
disable_notification=disable_notification,
protect_content=protect_content,
reply_parameters=reply_parameters,
- message_thread_id=message_thread_id,
- business_connection_id=business_connection_id,
+ message_thread_id=self.message_thread_id,
+ business_connection_id=self.business_connection_id,
schedule_date=schedule_date,
reply_markup=reply_markup
)
@@ -2880,8 +2776,6 @@ async def reply_sticker(
quote: bool = None,
disable_notification: bool = None,
protect_content: bool = None,
- message_thread_id: int = None,
- business_connection_id: str = None,
reply_parameters: "types.ReplyParameters" = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@@ -2928,12 +2822,6 @@ async def reply_sticker(
protect_content (``bool``, *optional*):
Protects the contents of the sent message from forwarding and saving.
- message_thread_id (``int``, *optional*):
- If the message is in a thread, ID of the original message.
-
- business_connection_id (``str``, *optional*):
- Unique identifier of the business connection on behalf of which the message will be sent.
-
reply_parameters (:obj:`~pyrogram.types.ReplyParameters`, *optional*):
Description of the message to reply to
@@ -2987,8 +2875,8 @@ async def reply_sticker(
sticker=sticker,
disable_notification=disable_notification,
protect_content=protect_content,
- message_thread_id=message_thread_id,
- business_connection_id=business_connection_id,
+ message_thread_id=self.message_thread_id,
+ business_connection_id=self.business_connection_id,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
schedule_date=schedule_date,
@@ -3007,8 +2895,6 @@ async def reply_venue(
foursquare_type: str = "",
disable_notification: bool = None,
reply_parameters: "types.ReplyParameters" = None,
- message_thread_id: int = None,
- business_connection_id: str = None,
schedule_date: datetime = None,
protect_content: bool = None,
reply_markup: Union[
@@ -3066,12 +2952,6 @@ async def reply_venue(
Sends the message silently.
Users will receive a notification with no sound.
- message_thread_id (``int``, *optional*):
- If the message is in a thread, ID of the original message.
-
- business_connection_id (``str``, *optional*):
- Unique identifier of the business connection on behalf of which the message will be sent.
-
schedule_date (:py:obj:`~datetime.datetime`, *optional*):
Date when the message will be automatically sent.
@@ -3109,8 +2989,8 @@ async def reply_venue(
foursquare_type=foursquare_type,
disable_notification=disable_notification,
reply_parameters=reply_parameters,
- message_thread_id=message_thread_id,
- business_connection_id=business_connection_id,
+ message_thread_id=self.message_thread_id,
+ business_connection_id=self.business_connection_id,
schedule_date=schedule_date,
protect_content=protect_content,
reply_markup=reply_markup
@@ -3131,8 +3011,6 @@ async def reply_video(
supports_streaming: bool = True,
disable_notification: bool = None,
protect_content: bool = None,
- message_thread_id: int = None,
- business_connection_id: str = None,
reply_parameters: "types.ReplyParameters" = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@@ -3214,12 +3092,6 @@ async def reply_video(
protect_content (``bool``, *optional*):
Protects the contents of the sent message from forwarding and saving.
- message_thread_id (``int``, *optional*):
- If the message is in a thread, ID of the original message.
-
- business_connection_id (``str``, *optional*):
- Unique identifier of the business connection on behalf of which the message will be sent.
-
reply_parameters (:obj:`~pyrogram.types.ReplyParameters`, *optional*):
Description of the message to reply to
@@ -3294,8 +3166,8 @@ async def reply_video(
supports_streaming=supports_streaming,
disable_notification=disable_notification,
protect_content=protect_content,
- message_thread_id=message_thread_id,
- business_connection_id=business_connection_id,
+ message_thread_id=self.message_thread_id,
+ business_connection_id=self.business_connection_id,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
ttl_seconds=ttl_seconds,
@@ -3315,8 +3187,6 @@ async def reply_video_note(
thumb: str = None,
disable_notification: bool = None,
protect_content: bool = None,
- message_thread_id: int = None,
- business_connection_id: str = None,
reply_parameters: "types.ReplyParameters" = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@@ -3380,12 +3250,6 @@ async def reply_video_note(
protect_content (``bool``, *optional*):
Protects the contents of the sent message from forwarding and saving.
- message_thread_id (``int``, *optional*):
- If the message is in a thread, ID of the original message.
-
- business_connection_id (``str``, *optional*):
- Unique identifier of the business connection on behalf of which the message will be sent.
-
reply_parameters (:obj:`~pyrogram.types.ReplyParameters`, *optional*):
Description of the message to reply to
@@ -3460,8 +3324,8 @@ async def reply_video_note(
thumb=thumb,
disable_notification=disable_notification,
protect_content=protect_content,
- message_thread_id=message_thread_id,
- business_connection_id=business_connection_id,
+ message_thread_id=self.message_thread_id,
+ business_connection_id=self.business_connection_id,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
caption=caption,
@@ -3484,8 +3348,6 @@ async def reply_voice(
duration: int = 0,
disable_notification: bool = None,
protect_content: bool = None,
- message_thread_id: int = None,
- business_connection_id: str = None,
reply_parameters: "types.ReplyParameters" = None,
reply_markup: Union[
"types.InlineKeyboardMarkup",
@@ -3548,12 +3410,6 @@ async def reply_voice(
protect_content (``bool``, *optional*):
Protects the contents of the sent message from forwarding and saving.
- message_thread_id (``int``, *optional*):
- If the message is in a thread, ID of the original message.
-
- business_connection_id (``str``, *optional*):
- Unique identifier of the business connection on behalf of which the message will be sent.
-
reply_parameters (:obj:`~pyrogram.types.ReplyParameters`, *optional*):
Description of the message to reply to
@@ -3622,8 +3478,8 @@ async def reply_voice(
duration=duration,
disable_notification=disable_notification,
protect_content=protect_content,
- message_thread_id=message_thread_id,
- business_connection_id=business_connection_id,
+ message_thread_id=self.message_thread_id,
+ business_connection_id=self.business_connection_id,
reply_parameters=reply_parameters,
reply_markup=reply_markup,
schedule_date=schedule_date,
diff --git a/pyrogram/types/user_and_chats/__init__.py b/pyrogram/types/user_and_chats/__init__.py
index 40293e2e8..1be75cf73 100644
--- a/pyrogram/types/user_and_chats/__init__.py
+++ b/pyrogram/types/user_and_chats/__init__.py
@@ -16,8 +16,10 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see .
+from .birthdate import Birthdate
from .chat import Chat
from .chat_admin_with_invite_links import ChatAdminWithInviteLinks
+from .chat_color import ChatColor
from .chat_event import ChatEvent
from .chat_event_filter import ChatEventFilter
from .chat_invite_link import ChatInviteLink
@@ -29,47 +31,45 @@
from .chat_photo import ChatPhoto
from .chat_privileges import ChatPrivileges
from .chat_reactions import ChatReactions
+from .chat_shared import ChatShared
from .dialog import Dialog
from .emoji_status import EmojiStatus
from .invite_link_importer import InviteLinkImporter
from .restriction import Restriction
from .user import User
+from .username import Username
+from .users_shared import UsersShared
from .video_chat_ended import VideoChatEnded
from .video_chat_participants_invited import VideoChatParticipantsInvited
from .video_chat_scheduled import VideoChatScheduled
from .video_chat_started import VideoChatStarted
-from .users_shared import UsersShared
-from .chat_shared import ChatShared
-from .birthdate import Birthdate
-from .username import Username
-from .chat_color import ChatColor
__all__ = [
+ "Birthdate",
"Chat",
- "ChatMember",
- "ChatPermissions",
- "ChatPhoto",
- "Dialog",
- "User",
- "Restriction",
+ "ChatAdminWithInviteLinks",
+ "ChatColor",
"ChatEvent",
"ChatEventFilter",
"ChatInviteLink",
- "InviteLinkImporter",
- "ChatAdminWithInviteLinks",
- "VideoChatStarted",
- "VideoChatEnded",
- "VideoChatParticipantsInvited",
- "ChatMemberUpdated",
- "VideoChatScheduled",
+ "ChatJoiner",
"ChatJoinRequest",
+ "ChatMember",
+ "ChatMemberUpdated",
+ "ChatPermissions",
+ "ChatPhoto",
"ChatPrivileges",
- "ChatJoiner",
- "EmojiStatus",
"ChatReactions",
- "UsersShared",
"ChatShared",
- "Birthdate",
+ "Dialog",
+ "EmojiStatus",
+ "InviteLinkImporter",
+ "Restriction",
+ "User",
"Username",
- "ChatColor",
+ "UsersShared",
+ "VideoChatEnded",
+ "VideoChatParticipantsInvited",
+ "VideoChatScheduled",
+ "VideoChatStarted",
]
diff --git a/pyrogram/types/user_and_chats/chat_join_request.py b/pyrogram/types/user_and_chats/chat_join_request.py
index 973561b16..8db650591 100644
--- a/pyrogram/types/user_and_chats/chat_join_request.py
+++ b/pyrogram/types/user_and_chats/chat_join_request.py
@@ -96,7 +96,7 @@ async def approve(self) -> bool:
await client.approve_chat_join_request(
chat_id=request.chat.id,
- user_id=request.user_chat_id
+ user_id=request.from_user.id
)
Example:
@@ -112,7 +112,7 @@ async def approve(self) -> bool:
"""
return await self._client.approve_chat_join_request(
chat_id=self.chat.id,
- user_id=self.user_chat_id
+ user_id=self.from_user.id
)
async def decline(self) -> bool:
@@ -124,7 +124,7 @@ async def decline(self) -> bool:
await client.decline_chat_join_request(
chat_id=request.chat.id,
- user_id=request.user_chat_id
+ user_id=request.from_user.id
)
Example:
@@ -140,5 +140,7 @@ async def decline(self) -> bool:
"""
return await self._client.decline_chat_join_request(
chat_id=self.chat.id,
- user_id=self.user_chat_id
+ user_id=self.from_user.id
)
+
+ # TODO