mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 13:27:47 +00:00
Reformat code
This commit is contained in:
parent
bdb03957db
commit
3e18945f3c
@ -16,5 +16,5 @@
|
|||||||
# You should have received a copy of the GNU Lesser General Public License
|
# You should have received a copy of the GNU Lesser General Public License
|
||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from .exceptions import *
|
|
||||||
from .error import UnknownError
|
from .error import UnknownError
|
||||||
|
from .exceptions import *
|
||||||
|
@ -21,12 +21,14 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class AnswerCallbackQuery(BaseClient):
|
class AnswerCallbackQuery(BaseClient):
|
||||||
def answer_callback_query(self,
|
def answer_callback_query(
|
||||||
callback_query_id: str,
|
self,
|
||||||
text: str = None,
|
callback_query_id: str,
|
||||||
show_alert: bool = None,
|
text: str = None,
|
||||||
url: str = None,
|
show_alert: bool = None,
|
||||||
cache_time: int = 0):
|
url: str = None,
|
||||||
|
cache_time: int = 0
|
||||||
|
):
|
||||||
"""Use this method to send answers to callback queries sent from inline keyboards.
|
"""Use this method to send answers to callback queries sent from inline keyboards.
|
||||||
The answer will be displayed to the user as a notification at the top of the chat screen or as an alert.
|
The answer will be displayed to the user as a notification at the top of the chat screen or as an alert.
|
||||||
|
|
||||||
|
@ -24,10 +24,12 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class GetGameHighScores(BaseClient):
|
class GetGameHighScores(BaseClient):
|
||||||
def get_game_high_scores(self,
|
def get_game_high_scores(
|
||||||
user_id: Union[int, str],
|
self,
|
||||||
chat_id: Union[int, str],
|
user_id: Union[int, str],
|
||||||
message_id: int = None):
|
chat_id: Union[int, str],
|
||||||
|
message_id: int = None
|
||||||
|
):
|
||||||
"""Use this method to get data for high score tables.
|
"""Use this method to get data for high score tables.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -24,12 +24,14 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class GetInlineBotResults(BaseClient):
|
class GetInlineBotResults(BaseClient):
|
||||||
def get_inline_bot_results(self,
|
def get_inline_bot_results(
|
||||||
bot: Union[int, str],
|
self,
|
||||||
query: str,
|
bot: Union[int, str],
|
||||||
offset: str = "",
|
query: str,
|
||||||
latitude: float = None,
|
offset: str = "",
|
||||||
longitude: float = None):
|
latitude: float = None,
|
||||||
|
longitude: float = None
|
||||||
|
):
|
||||||
"""Use this method to get bot results via inline queries.
|
"""Use this method to get bot results via inline queries.
|
||||||
You can then send a result using :obj:`send_inline_bot_result <pyrogram.Client.send_inline_bot_result>`
|
You can then send a result using :obj:`send_inline_bot_result <pyrogram.Client.send_inline_bot_result>`
|
||||||
|
|
||||||
|
@ -23,10 +23,12 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class RequestCallbackAnswer(BaseClient):
|
class RequestCallbackAnswer(BaseClient):
|
||||||
def request_callback_answer(self,
|
def request_callback_answer(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
message_id: int,
|
chat_id: Union[int, str],
|
||||||
callback_data: bytes):
|
message_id: int,
|
||||||
|
callback_data: bytes
|
||||||
|
):
|
||||||
"""Use this method to request a callback answer from bots. This is the equivalent of clicking an
|
"""Use this method to request a callback answer from bots. This is the equivalent of clicking an
|
||||||
inline button containing callback data.
|
inline button containing callback data.
|
||||||
|
|
||||||
|
@ -24,15 +24,19 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class SendGame(BaseClient):
|
class SendGame(BaseClient):
|
||||||
def send_game(self,
|
def send_game(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
game_short_name: str,
|
chat_id: Union[int, str],
|
||||||
disable_notification: bool = None,
|
game_short_name: str,
|
||||||
reply_to_message_id: int = None,
|
disable_notification: bool = None,
|
||||||
reply_markup: Union["pyrogram.InlineKeyboardMarkup",
|
reply_to_message_id: int = None,
|
||||||
"pyrogram.ReplyKeyboardMarkup",
|
reply_markup: Union[
|
||||||
"pyrogram.ReplyKeyboardRemove",
|
"pyrogram.InlineKeyboardMarkup",
|
||||||
"pyrogram.ForceReply"] = None) -> "pyrogram.Message":
|
"pyrogram.ReplyKeyboardMarkup",
|
||||||
|
"pyrogram.ReplyKeyboardRemove",
|
||||||
|
"pyrogram.ForceReply"
|
||||||
|
] = None
|
||||||
|
) -> "pyrogram.Message":
|
||||||
"""Use this method to send a game.
|
"""Use this method to send a game.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -23,13 +23,15 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class SendInlineBotResult(BaseClient):
|
class SendInlineBotResult(BaseClient):
|
||||||
def send_inline_bot_result(self,
|
def send_inline_bot_result(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
query_id: int,
|
chat_id: Union[int, str],
|
||||||
result_id: str,
|
query_id: int,
|
||||||
disable_notification: bool = None,
|
result_id: str,
|
||||||
reply_to_message_id: int = None,
|
disable_notification: bool = None,
|
||||||
hide_via: bool = None):
|
reply_to_message_id: int = None,
|
||||||
|
hide_via: bool = None
|
||||||
|
):
|
||||||
"""Use this method to send an inline bot result.
|
"""Use this method to send an inline bot result.
|
||||||
Bot results can be retrieved using :obj:`get_inline_bot_results <pyrogram.Client.get_inline_bot_results>`
|
Bot results can be retrieved using :obj:`get_inline_bot_results <pyrogram.Client.get_inline_bot_results>`
|
||||||
|
|
||||||
|
@ -24,13 +24,15 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class SetGameScore(BaseClient):
|
class SetGameScore(BaseClient):
|
||||||
def set_game_score(self,
|
def set_game_score(
|
||||||
user_id: Union[int, str],
|
self,
|
||||||
score: int,
|
user_id: Union[int, str],
|
||||||
force: bool = None,
|
score: int,
|
||||||
disable_edit_message: bool = None,
|
force: bool = None,
|
||||||
chat_id: Union[int, str] = None,
|
disable_edit_message: bool = None,
|
||||||
message_id: int = None):
|
chat_id: Union[int, str] = None,
|
||||||
|
message_id: int = None
|
||||||
|
):
|
||||||
# inline_message_id: str = None): TODO Add inline_message_id
|
# inline_message_id: str = None): TODO Add inline_message_id
|
||||||
"""Use this method to set the score of the specified user in a game.
|
"""Use this method to set the score of the specified user in a game.
|
||||||
|
|
||||||
|
@ -23,8 +23,10 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class DeleteChatPhoto(BaseClient):
|
class DeleteChatPhoto(BaseClient):
|
||||||
def delete_chat_photo(self,
|
def delete_chat_photo(
|
||||||
chat_id: Union[int, str]) -> bool:
|
self,
|
||||||
|
chat_id: Union[int, str]
|
||||||
|
) -> bool:
|
||||||
"""Use this method to delete a chat photo.
|
"""Use this method to delete a chat photo.
|
||||||
Photos can't be changed for private chats.
|
Photos can't be changed for private chats.
|
||||||
You must be an administrator in the chat for this to work and must have the appropriate admin rights.
|
You must be an administrator in the chat for this to work and must have the appropriate admin rights.
|
||||||
|
@ -23,8 +23,10 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class ExportChatInviteLink(BaseClient):
|
class ExportChatInviteLink(BaseClient):
|
||||||
def export_chat_invite_link(self,
|
def export_chat_invite_link(
|
||||||
chat_id: Union[int, str]) -> str:
|
self,
|
||||||
|
chat_id: Union[int, str]
|
||||||
|
) -> str:
|
||||||
"""Use this method to generate a new invite link for a chat; any previously generated link is revoked.
|
"""Use this method to generate a new invite link for a chat; any previously generated link is revoked.
|
||||||
|
|
||||||
You must be an administrator in the chat for this to work and have the appropriate admin rights.
|
You must be an administrator in the chat for this to work and have the appropriate admin rights.
|
||||||
|
@ -24,8 +24,10 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class GetChat(BaseClient):
|
class GetChat(BaseClient):
|
||||||
def get_chat(self,
|
def get_chat(
|
||||||
chat_id: Union[int, str]) -> "pyrogram.Chat":
|
self,
|
||||||
|
chat_id: Union[int, str]
|
||||||
|
) -> "pyrogram.Chat":
|
||||||
"""Use this method to get up to date information about the chat (current name of the user for
|
"""Use this method to get up to date information about the chat (current name of the user for
|
||||||
one-on-one conversations, current username of a user, group or channel, etc.)
|
one-on-one conversations, current username of a user, group or channel, etc.)
|
||||||
|
|
||||||
|
@ -24,9 +24,11 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class GetChatMember(BaseClient):
|
class GetChatMember(BaseClient):
|
||||||
def get_chat_member(self,
|
def get_chat_member(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
user_id: Union[int, str]) -> "pyrogram.ChatMember":
|
chat_id: Union[int, str],
|
||||||
|
user_id: Union[int, str]
|
||||||
|
) -> "pyrogram.ChatMember":
|
||||||
"""Use this method to get information about one member of a chat.
|
"""Use this method to get information about one member of a chat.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -33,12 +33,14 @@ class Filters:
|
|||||||
|
|
||||||
|
|
||||||
class GetChatMembers(BaseClient):
|
class GetChatMembers(BaseClient):
|
||||||
def get_chat_members(self,
|
def get_chat_members(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
offset: int = 0,
|
chat_id: Union[int, str],
|
||||||
limit: int = 200,
|
offset: int = 0,
|
||||||
query: str = "",
|
limit: int = 200,
|
||||||
filter: str = Filters.ALL) -> "pyrogram.ChatMembers":
|
query: str = "",
|
||||||
|
filter: str = Filters.ALL
|
||||||
|
) -> "pyrogram.ChatMembers":
|
||||||
"""Use this method to get a chunk of the members list of a chat.
|
"""Use this method to get a chunk of the members list of a chat.
|
||||||
|
|
||||||
You can get up to 200 chat members at once.
|
You can get up to 200 chat members at once.
|
||||||
|
@ -23,8 +23,10 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class GetChatMembersCount(BaseClient):
|
class GetChatMembersCount(BaseClient):
|
||||||
def get_chat_members_count(self,
|
def get_chat_members_count(
|
||||||
chat_id: Union[int, str]) -> int:
|
self,
|
||||||
|
chat_id: Union[int, str]
|
||||||
|
) -> int:
|
||||||
"""Use this method to get the number of members in a chat.
|
"""Use this method to get the number of members in a chat.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -22,8 +22,10 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class GetChatPreview(BaseClient):
|
class GetChatPreview(BaseClient):
|
||||||
def get_chat_preview(self,
|
def get_chat_preview(
|
||||||
invite_link: str):
|
self,
|
||||||
|
invite_link: str
|
||||||
|
):
|
||||||
"""Use this method to get the preview of a chat using the invite link.
|
"""Use this method to get the preview of a chat using the invite link.
|
||||||
|
|
||||||
This method only returns a chat preview, if you want to join a chat use :meth:`join_chat`
|
This method only returns a chat preview, if you want to join a chat use :meth:`join_chat`
|
||||||
|
@ -28,10 +28,12 @@ log = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
class GetDialogs(BaseClient):
|
class GetDialogs(BaseClient):
|
||||||
def get_dialogs(self,
|
def get_dialogs(
|
||||||
offset_date: int = 0,
|
self,
|
||||||
limit: int = 100,
|
offset_date: int = 0,
|
||||||
pinned_only: bool = False) -> "pyrogram.Dialogs":
|
limit: int = 100,
|
||||||
|
pinned_only: bool = False
|
||||||
|
) -> "pyrogram.Dialogs":
|
||||||
"""Use this method to get a chunk of the user's dialogs
|
"""Use this method to get a chunk of the user's dialogs
|
||||||
|
|
||||||
You can get up to 100 dialogs at once.
|
You can get up to 100 dialogs at once.
|
||||||
|
@ -38,11 +38,13 @@ QUERYABLE_FILTERS = (Filters.ALL, Filters.KICKED, Filters.RESTRICTED)
|
|||||||
|
|
||||||
|
|
||||||
class IterChatMembers(BaseClient):
|
class IterChatMembers(BaseClient):
|
||||||
def iter_chat_members(self,
|
def iter_chat_members(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
limit: int = 0,
|
chat_id: Union[int, str],
|
||||||
query: str = "",
|
limit: int = 0,
|
||||||
filter: str = Filters.ALL) -> Generator["pyrogram.ChatMember", None, None]:
|
query: str = "",
|
||||||
|
filter: str = Filters.ALL
|
||||||
|
) -> Generator["pyrogram.ChatMember", None, None]:
|
||||||
"""Use this method to iterate through the members of a chat sequentially.
|
"""Use this method to iterate through the members of a chat sequentially.
|
||||||
|
|
||||||
This convenience method does the same as repeatedly calling :meth:`get_chat_members` in a loop, thus saving you
|
This convenience method does the same as repeatedly calling :meth:`get_chat_members` in a loop, thus saving you
|
||||||
|
@ -23,9 +23,11 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class IterDialogs(BaseClient):
|
class IterDialogs(BaseClient):
|
||||||
def iter_dialogs(self,
|
def iter_dialogs(
|
||||||
offset_date: int = 0,
|
self,
|
||||||
limit: int = 0) -> Generator["pyrogram.Dialog", None, None]:
|
offset_date: int = 0,
|
||||||
|
limit: int = 0
|
||||||
|
) -> Generator["pyrogram.Dialog", None, None]:
|
||||||
"""Use this method to iterate through a user's dialogs sequentially.
|
"""Use this method to iterate through a user's dialogs sequentially.
|
||||||
|
|
||||||
This convenience method does the same as repeatedly calling :meth:`get_dialogs` in a loop, thus saving you from
|
This convenience method does the same as repeatedly calling :meth:`get_dialogs` in a loop, thus saving you from
|
||||||
|
@ -22,8 +22,10 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class JoinChat(BaseClient):
|
class JoinChat(BaseClient):
|
||||||
def join_chat(self,
|
def join_chat(
|
||||||
chat_id: str):
|
self,
|
||||||
|
chat_id: str
|
||||||
|
):
|
||||||
"""Use this method to join a group chat or channel.
|
"""Use this method to join a group chat or channel.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -24,10 +24,12 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class KickChatMember(BaseClient):
|
class KickChatMember(BaseClient):
|
||||||
def kick_chat_member(self,
|
def kick_chat_member(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
user_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
until_date: int = 0) -> Union["pyrogram.Message", bool]:
|
user_id: Union[int, str],
|
||||||
|
until_date: int = 0
|
||||||
|
) -> Union["pyrogram.Message", bool]:
|
||||||
"""Use this method to kick a user from a group, a supergroup or a channel.
|
"""Use this method to kick a user from a group, a supergroup or a channel.
|
||||||
In the case of supergroups and channels, the user will not be able to return to the group on their own using
|
In the case of supergroups and channels, the user will not be able to return to the group on their own using
|
||||||
invite links, etc., unless unbanned first. You must be an administrator in the chat for this to work and must
|
invite links, etc., unless unbanned first. You must be an administrator in the chat for this to work and must
|
||||||
|
@ -23,9 +23,11 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class LeaveChat(BaseClient):
|
class LeaveChat(BaseClient):
|
||||||
def leave_chat(self,
|
def leave_chat(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
delete: bool = False):
|
chat_id: Union[int, str],
|
||||||
|
delete: bool = False
|
||||||
|
):
|
||||||
"""Use this method to leave a group chat or channel.
|
"""Use this method to leave a group chat or channel.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -23,10 +23,12 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class PinChatMessage(BaseClient):
|
class PinChatMessage(BaseClient):
|
||||||
def pin_chat_message(self,
|
def pin_chat_message(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
message_id: int,
|
chat_id: Union[int, str],
|
||||||
disable_notification: bool = None) -> bool:
|
message_id: int,
|
||||||
|
disable_notification: bool = None
|
||||||
|
) -> bool:
|
||||||
"""Use this method to pin a message in a group, channel or your own chat.
|
"""Use this method to pin a message in a group, channel or your own chat.
|
||||||
You must be an administrator in the chat for this to work and must have the "can_pin_messages" admin right in
|
You must be an administrator in the chat for this to work and must have the "can_pin_messages" admin right in
|
||||||
the supergroup or "can_edit_messages" admin right in the channel.
|
the supergroup or "can_edit_messages" admin right in the channel.
|
||||||
@ -55,3 +57,5 @@ class PinChatMessage(BaseClient):
|
|||||||
silent=disable_notification or None
|
silent=disable_notification or None
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
return True
|
||||||
|
@ -23,17 +23,19 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class PromoteChatMember(BaseClient):
|
class PromoteChatMember(BaseClient):
|
||||||
def promote_chat_member(self,
|
def promote_chat_member(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
user_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
can_change_info: bool = True,
|
user_id: Union[int, str],
|
||||||
can_post_messages: bool = False,
|
can_change_info: bool = True,
|
||||||
can_edit_messages: bool = False,
|
can_post_messages: bool = False,
|
||||||
can_delete_messages: bool = True,
|
can_edit_messages: bool = False,
|
||||||
can_restrict_members: bool = True,
|
can_delete_messages: bool = True,
|
||||||
can_invite_users: bool = True,
|
can_restrict_members: bool = True,
|
||||||
can_pin_messages: bool = False,
|
can_invite_users: bool = True,
|
||||||
can_promote_members: bool = False) -> bool:
|
can_pin_messages: bool = False,
|
||||||
|
can_promote_members: bool = False
|
||||||
|
) -> bool:
|
||||||
"""Use this method to promote or demote a user in a supergroup or a channel.
|
"""Use this method to promote or demote a user in a supergroup or a channel.
|
||||||
|
|
||||||
You must be an administrator in the chat for this to work and must have the appropriate admin rights.
|
You must be an administrator in the chat for this to work and must have the appropriate admin rights.
|
||||||
|
@ -23,9 +23,11 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class SetChatDescription(BaseClient):
|
class SetChatDescription(BaseClient):
|
||||||
def set_chat_description(self,
|
def set_chat_description(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
description: str) -> bool:
|
chat_id: Union[int, str],
|
||||||
|
description: str
|
||||||
|
) -> bool:
|
||||||
"""Use this method to change the description of a supergroup or a channel.
|
"""Use this method to change the description of a supergroup or a channel.
|
||||||
You must be an administrator in the chat for this to work and must have the appropriate admin rights.
|
You must be an administrator in the chat for this to work and must have the appropriate admin rights.
|
||||||
|
|
||||||
|
@ -26,9 +26,11 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class SetChatPhoto(BaseClient):
|
class SetChatPhoto(BaseClient):
|
||||||
def set_chat_photo(self,
|
def set_chat_photo(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
photo: str) -> bool:
|
chat_id: Union[int, str],
|
||||||
|
photo: str
|
||||||
|
) -> bool:
|
||||||
"""Use this method to set a new profile photo for the chat.
|
"""Use this method to set a new profile photo for the chat.
|
||||||
Photos can't be changed for private chats.
|
Photos can't be changed for private chats.
|
||||||
You must be an administrator in the chat for this to work and must have the appropriate admin rights.
|
You must be an administrator in the chat for this to work and must have the appropriate admin rights.
|
||||||
|
@ -23,9 +23,11 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class SetChatTitle(BaseClient):
|
class SetChatTitle(BaseClient):
|
||||||
def set_chat_title(self,
|
def set_chat_title(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
title: str) -> bool:
|
chat_id: Union[int, str],
|
||||||
|
title: str
|
||||||
|
) -> bool:
|
||||||
"""Use this method to change the title of a chat.
|
"""Use this method to change the title of a chat.
|
||||||
Titles can't be changed for private chats.
|
Titles can't be changed for private chats.
|
||||||
You must be an administrator in the chat for this to work and must have the appropriate admin rights.
|
You must be an administrator in the chat for this to work and must have the appropriate admin rights.
|
||||||
|
@ -23,9 +23,11 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class UnbanChatMember(BaseClient):
|
class UnbanChatMember(BaseClient):
|
||||||
def unban_chat_member(self,
|
def unban_chat_member(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
user_id: Union[int, str]) -> bool:
|
chat_id: Union[int, str],
|
||||||
|
user_id: Union[int, str]
|
||||||
|
) -> bool:
|
||||||
"""Use this method to unban a previously kicked user in a supergroup or channel.
|
"""Use this method to unban a previously kicked user in a supergroup or channel.
|
||||||
The user will **not** return to the group or channel automatically, but will be able to join via link, etc.
|
The user will **not** return to the group or channel automatically, but will be able to join via link, etc.
|
||||||
You must be an administrator for this to work.
|
You must be an administrator for this to work.
|
||||||
|
@ -23,8 +23,10 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class UnpinChatMessage(BaseClient):
|
class UnpinChatMessage(BaseClient):
|
||||||
def unpin_chat_message(self,
|
def unpin_chat_message(
|
||||||
chat_id: Union[int, str]) -> bool:
|
self,
|
||||||
|
chat_id: Union[int, str]
|
||||||
|
) -> bool:
|
||||||
"""Use this method to unpin a message in a group, channel or your own chat.
|
"""Use this method to unpin a message in a group, channel or your own chat.
|
||||||
You must be an administrator in the chat for this to work and must have the "can_pin_messages" admin
|
You must be an administrator in the chat for this to work and must have the "can_pin_messages" admin
|
||||||
right in the supergroup or "can_edit_messages" admin right in the channel.
|
right in the supergroup or "can_edit_messages" admin right in the channel.
|
||||||
|
@ -23,9 +23,11 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class UpdateChatUsername(BaseClient):
|
class UpdateChatUsername(BaseClient):
|
||||||
def update_chat_username(self,
|
def update_chat_username(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
username: Union[str, None]) -> bool:
|
chat_id: Union[int, str],
|
||||||
|
username: Union[str, None]
|
||||||
|
) -> bool:
|
||||||
"""Use this method to update a channel or a supergroup username.
|
"""Use this method to update a channel or a supergroup username.
|
||||||
|
|
||||||
To update your own username (for users only, not bots) you can use :meth:`update_username`.
|
To update your own username (for users only, not bots) you can use :meth:`update_username`.
|
||||||
|
@ -24,8 +24,10 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class AddContacts(BaseClient):
|
class AddContacts(BaseClient):
|
||||||
def add_contacts(self,
|
def add_contacts(
|
||||||
contacts: List["pyrogram.InputPhoneContact"]):
|
self,
|
||||||
|
contacts: List["pyrogram.InputPhoneContact"]
|
||||||
|
):
|
||||||
"""Use this method to add contacts to your Telegram address book.
|
"""Use this method to add contacts to your Telegram address book.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -24,8 +24,10 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class DeleteContacts(BaseClient):
|
class DeleteContacts(BaseClient):
|
||||||
def delete_contacts(self,
|
def delete_contacts(
|
||||||
ids: List[int]):
|
self,
|
||||||
|
ids: List[int]
|
||||||
|
):
|
||||||
"""Use this method to delete contacts from your Telegram address book
|
"""Use this method to delete contacts from your Telegram address book
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -25,9 +25,11 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class OnCallbackQuery(BaseClient):
|
class OnCallbackQuery(BaseClient):
|
||||||
def on_callback_query(self=None,
|
def on_callback_query(
|
||||||
filters=None,
|
self=None,
|
||||||
group: int = 0) -> callable:
|
filters=None,
|
||||||
|
group: int = 0
|
||||||
|
) -> callable:
|
||||||
"""Use this decorator to automatically register a function for handling
|
"""Use this decorator to automatically register a function for handling
|
||||||
callback queries. This does the same thing as :meth:`add_handler` using the
|
callback queries. This does the same thing as :meth:`add_handler` using the
|
||||||
:class:`CallbackQueryHandler`.
|
:class:`CallbackQueryHandler`.
|
||||||
|
@ -25,9 +25,11 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class OnDeletedMessages(BaseClient):
|
class OnDeletedMessages(BaseClient):
|
||||||
def on_deleted_messages(self=None,
|
def on_deleted_messages(
|
||||||
filters=None,
|
self=None,
|
||||||
group: int = 0) -> callable:
|
filters=None,
|
||||||
|
group: int = 0
|
||||||
|
) -> callable:
|
||||||
"""Use this decorator to automatically register a function for handling
|
"""Use this decorator to automatically register a function for handling
|
||||||
deleted messages. This does the same thing as :meth:`add_handler` using the
|
deleted messages. This does the same thing as :meth:`add_handler` using the
|
||||||
:class:`DeletedMessagesHandler`.
|
:class:`DeletedMessagesHandler`.
|
||||||
|
@ -25,9 +25,11 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class OnMessage(BaseClient):
|
class OnMessage(BaseClient):
|
||||||
def on_message(self=None,
|
def on_message(
|
||||||
filters=None,
|
self=None,
|
||||||
group: int = 0) -> callable:
|
filters=None,
|
||||||
|
group: int = 0
|
||||||
|
) -> callable:
|
||||||
"""Use this decorator to automatically register a function for handling
|
"""Use this decorator to automatically register a function for handling
|
||||||
messages. This does the same thing as :meth:`add_handler` using the
|
messages. This does the same thing as :meth:`add_handler` using the
|
||||||
:class:`MessageHandler`.
|
:class:`MessageHandler`.
|
||||||
|
@ -24,8 +24,10 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class OnRawUpdate(BaseClient):
|
class OnRawUpdate(BaseClient):
|
||||||
def on_raw_update(self=None,
|
def on_raw_update(
|
||||||
group: int = 0) -> callable:
|
self=None,
|
||||||
|
group: int = 0
|
||||||
|
) -> callable:
|
||||||
"""Use this decorator to automatically register a function for handling
|
"""Use this decorator to automatically register a function for handling
|
||||||
raw updates. This does the same thing as :meth:`add_handler` using the
|
raw updates. This does the same thing as :meth:`add_handler` using the
|
||||||
:class:`RawUpdateHandler`.
|
:class:`RawUpdateHandler`.
|
||||||
|
@ -25,9 +25,11 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class OnUserStatus(BaseClient):
|
class OnUserStatus(BaseClient):
|
||||||
def on_user_status(self=None,
|
def on_user_status(
|
||||||
filters=None,
|
self=None,
|
||||||
group: int = 0) -> callable:
|
filters=None,
|
||||||
|
group: int = 0
|
||||||
|
) -> callable:
|
||||||
"""Use this decorator to automatically register a function for handling
|
"""Use this decorator to automatically register a function for handling
|
||||||
user status updates. This does the same thing as :meth:`add_handler` using the
|
user status updates. This does the same thing as :meth:`add_handler` using the
|
||||||
:class:`UserStatusHandler`.
|
:class:`UserStatusHandler`.
|
||||||
|
@ -23,9 +23,11 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class ClosePoll(BaseClient):
|
class ClosePoll(BaseClient):
|
||||||
def close_poll(self,
|
def close_poll(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
message_id: id) -> bool:
|
chat_id: Union[int, str],
|
||||||
|
message_id: id
|
||||||
|
) -> bool:
|
||||||
"""Use this method to close (stop) a poll.
|
"""Use this method to close (stop) a poll.
|
||||||
|
|
||||||
Closed polls can't be reopened and nobody will be able to vote in it anymore.
|
Closed polls can't be reopened and nobody will be able to vote in it anymore.
|
||||||
|
@ -23,10 +23,12 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class DeleteMessages(BaseClient):
|
class DeleteMessages(BaseClient):
|
||||||
def delete_messages(self,
|
def delete_messages(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
message_ids: Iterable[int],
|
chat_id: Union[int, str],
|
||||||
revoke: bool = True) -> bool:
|
message_ids: Iterable[int],
|
||||||
|
revoke: bool = True
|
||||||
|
) -> bool:
|
||||||
"""Use this method to delete messages, including service messages, with the following limitations:
|
"""Use this method to delete messages, including service messages, with the following limitations:
|
||||||
|
|
||||||
- A message can only be deleted if it was sent less than 48 hours ago.
|
- A message can only be deleted if it was sent less than 48 hours ago.
|
||||||
|
@ -24,12 +24,14 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class DownloadMedia(BaseClient):
|
class DownloadMedia(BaseClient):
|
||||||
def download_media(self,
|
def download_media(
|
||||||
message: Union["pyrogram.Message", str],
|
self,
|
||||||
file_name: str = "",
|
message: Union["pyrogram.Message", str],
|
||||||
block: bool = True,
|
file_name: str = "",
|
||||||
progress: callable = None,
|
block: bool = True,
|
||||||
progress_args: tuple = ()) -> Union[str, None]:
|
progress: callable = None,
|
||||||
|
progress_args: tuple = ()
|
||||||
|
) -> Union[str, None]:
|
||||||
"""Use this method to download the media from a Message.
|
"""Use this method to download the media from a Message.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -24,12 +24,14 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class EditMessageCaption(BaseClient):
|
class EditMessageCaption(BaseClient):
|
||||||
def edit_message_caption(self,
|
def edit_message_caption(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
message_id: int,
|
chat_id: Union[int, str],
|
||||||
caption: str,
|
message_id: int,
|
||||||
parse_mode: str = "",
|
caption: str,
|
||||||
reply_markup: "pyrogram.InlineKeyboardMarkup" = None) -> "pyrogram.Message":
|
parse_mode: str = "",
|
||||||
|
reply_markup: "pyrogram.InlineKeyboardMarkup" = None
|
||||||
|
) -> "pyrogram.Message":
|
||||||
"""Use this method to edit captions of messages.
|
"""Use this method to edit captions of messages.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -33,11 +33,13 @@ from pyrogram.client.types.input_media import InputMedia
|
|||||||
|
|
||||||
|
|
||||||
class EditMessageMedia(BaseClient):
|
class EditMessageMedia(BaseClient):
|
||||||
def edit_message_media(self,
|
def edit_message_media(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
message_id: int,
|
chat_id: Union[int, str],
|
||||||
media: InputMedia,
|
message_id: int,
|
||||||
reply_markup: "pyrogram.InlineKeyboardMarkup" = None) -> "pyrogram.Message":
|
media: InputMedia,
|
||||||
|
reply_markup: "pyrogram.InlineKeyboardMarkup" = None
|
||||||
|
) -> "pyrogram.Message":
|
||||||
"""Use this method to edit audio, document, photo, or video messages.
|
"""Use this method to edit audio, document, photo, or video messages.
|
||||||
|
|
||||||
If a message is a part of a message album, then it can be edited only to a photo or a video. Otherwise,
|
If a message is a part of a message album, then it can be edited only to a photo or a video. Otherwise,
|
||||||
|
@ -24,10 +24,12 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class EditMessageReplyMarkup(BaseClient):
|
class EditMessageReplyMarkup(BaseClient):
|
||||||
def edit_message_reply_markup(self,
|
def edit_message_reply_markup(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
message_id: int,
|
chat_id: Union[int, str],
|
||||||
reply_markup: "pyrogram.InlineKeyboardMarkup" = None) -> "pyrogram.Message":
|
message_id: int,
|
||||||
|
reply_markup: "pyrogram.InlineKeyboardMarkup" = None
|
||||||
|
) -> "pyrogram.Message":
|
||||||
"""Use this method to edit only the reply markup of messages sent by the bot or via the bot (for inline bots).
|
"""Use this method to edit only the reply markup of messages sent by the bot or via the bot (for inline bots).
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -24,13 +24,15 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class EditMessageText(BaseClient):
|
class EditMessageText(BaseClient):
|
||||||
def edit_message_text(self,
|
def edit_message_text(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
message_id: int,
|
chat_id: Union[int, str],
|
||||||
text: str,
|
message_id: int,
|
||||||
parse_mode: str = "",
|
text: str,
|
||||||
disable_web_page_preview: bool = None,
|
parse_mode: str = "",
|
||||||
reply_markup: "pyrogram.InlineKeyboardMarkup" = None) -> "pyrogram.Message":
|
disable_web_page_preview: bool = None,
|
||||||
|
reply_markup: "pyrogram.InlineKeyboardMarkup" = None
|
||||||
|
) -> "pyrogram.Message":
|
||||||
"""Use this method to edit text messages.
|
"""Use this method to edit text messages.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -24,11 +24,13 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class ForwardMessages(BaseClient):
|
class ForwardMessages(BaseClient):
|
||||||
def forward_messages(self,
|
def forward_messages(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
from_chat_id: Union[int, str],
|
chat_id: Union[int, str],
|
||||||
message_ids: Iterable[int],
|
from_chat_id: Union[int, str],
|
||||||
disable_notification: bool = None) -> "pyrogram.Messages":
|
message_ids: Iterable[int],
|
||||||
|
disable_notification: bool = None
|
||||||
|
) -> "pyrogram.Messages":
|
||||||
"""Use this method to forward messages of any kind.
|
"""Use this method to forward messages of any kind.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -29,13 +29,15 @@ log = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
class GetHistory(BaseClient):
|
class GetHistory(BaseClient):
|
||||||
def get_history(self,
|
def get_history(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
limit: int = 100,
|
chat_id: Union[int, str],
|
||||||
offset: int = 0,
|
limit: int = 100,
|
||||||
offset_id: int = 0,
|
offset: int = 0,
|
||||||
offset_date: int = 0,
|
offset_id: int = 0,
|
||||||
reverse: bool = False):
|
offset_date: int = 0,
|
||||||
|
reverse: bool = False
|
||||||
|
):
|
||||||
"""Use this method to retrieve a chunk of the history of a chat.
|
"""Use this method to retrieve a chunk of the history of a chat.
|
||||||
|
|
||||||
You can get up to 100 messages at once.
|
You can get up to 100 messages at once.
|
||||||
|
@ -29,11 +29,13 @@ log = logging.getLogger(__name__)
|
|||||||
|
|
||||||
|
|
||||||
class GetMessages(BaseClient):
|
class GetMessages(BaseClient):
|
||||||
def get_messages(self,
|
def get_messages(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
message_ids: Union[int, Iterable[int]] = None,
|
chat_id: Union[int, str],
|
||||||
reply_to_message_ids: Union[int, Iterable[int]] = None,
|
message_ids: Union[int, Iterable[int]] = None,
|
||||||
replies: int = 1) -> Union["pyrogram.Message", "pyrogram.Messages"]:
|
reply_to_message_ids: Union[int, Iterable[int]] = None,
|
||||||
|
replies: int = 1
|
||||||
|
) -> Union["pyrogram.Message", "pyrogram.Messages"]:
|
||||||
"""Use this method to get one or more messages that belong to a specific chat.
|
"""Use this method to get one or more messages that belong to a specific chat.
|
||||||
You can retrieve up to 200 messages at once.
|
You can retrieve up to 200 messages at once.
|
||||||
|
|
||||||
|
@ -23,13 +23,15 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class IterHistory(BaseClient):
|
class IterHistory(BaseClient):
|
||||||
def iter_history(self,
|
def iter_history(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
limit: int = 0,
|
chat_id: Union[int, str],
|
||||||
offset: int = 0,
|
limit: int = 0,
|
||||||
offset_id: int = 0,
|
offset: int = 0,
|
||||||
offset_date: int = 0,
|
offset_id: int = 0,
|
||||||
reverse: bool = False) -> Generator["pyrogram.Message", None, None]:
|
offset_date: int = 0,
|
||||||
|
reverse: bool = False
|
||||||
|
) -> Generator["pyrogram.Message", None, None]:
|
||||||
"""Use this method to iterate through a chat history sequentially.
|
"""Use this method to iterate through a chat history sequentially.
|
||||||
|
|
||||||
This convenience method does the same as repeatedly calling :meth:`get_history` in a loop, thus saving you from
|
This convenience method does the same as repeatedly calling :meth:`get_history` in a loop, thus saving you from
|
||||||
|
@ -23,9 +23,11 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class RetractVote(BaseClient):
|
class RetractVote(BaseClient):
|
||||||
def retract_vote(self,
|
def retract_vote(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
message_id: id) -> bool:
|
chat_id: Union[int, str],
|
||||||
|
message_id: id
|
||||||
|
) -> bool:
|
||||||
"""Use this method to retract your vote in a poll.
|
"""Use this method to retract your vote in a poll.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -28,23 +28,27 @@ from pyrogram.client.ext import BaseClient, utils
|
|||||||
|
|
||||||
|
|
||||||
class SendAnimation(BaseClient):
|
class SendAnimation(BaseClient):
|
||||||
def send_animation(self,
|
def send_animation(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
animation: str,
|
chat_id: Union[int, str],
|
||||||
caption: str = "",
|
animation: str,
|
||||||
parse_mode: str = "",
|
caption: str = "",
|
||||||
duration: int = 0,
|
parse_mode: str = "",
|
||||||
width: int = 0,
|
duration: int = 0,
|
||||||
height: int = 0,
|
width: int = 0,
|
||||||
thumb: str = None,
|
height: int = 0,
|
||||||
disable_notification: bool = None,
|
thumb: str = None,
|
||||||
reply_to_message_id: int = None,
|
disable_notification: bool = None,
|
||||||
reply_markup: Union["pyrogram.InlineKeyboardMarkup",
|
reply_to_message_id: int = None,
|
||||||
"pyrogram.ReplyKeyboardMarkup",
|
reply_markup: Union[
|
||||||
"pyrogram.ReplyKeyboardRemove",
|
"pyrogram.InlineKeyboardMarkup",
|
||||||
"pyrogram.ForceReply"] = None,
|
"pyrogram.ReplyKeyboardMarkup",
|
||||||
progress: callable = None,
|
"pyrogram.ReplyKeyboardRemove",
|
||||||
progress_args: tuple = ()) -> Union["pyrogram.Message", None]:
|
"pyrogram.ForceReply"
|
||||||
|
] = None,
|
||||||
|
progress: callable = None,
|
||||||
|
progress_args: tuple = ()
|
||||||
|
) -> Union["pyrogram.Message", None]:
|
||||||
"""Use this method to send animation files (animation or H.264/MPEG-4 AVC video without sound).
|
"""Use this method to send animation files (animation or H.264/MPEG-4 AVC video without sound).
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -28,23 +28,27 @@ from pyrogram.client.ext import BaseClient, utils
|
|||||||
|
|
||||||
|
|
||||||
class SendAudio(BaseClient):
|
class SendAudio(BaseClient):
|
||||||
def send_audio(self,
|
def send_audio(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
audio: str,
|
chat_id: Union[int, str],
|
||||||
caption: str = "",
|
audio: str,
|
||||||
parse_mode: str = "",
|
caption: str = "",
|
||||||
duration: int = 0,
|
parse_mode: str = "",
|
||||||
performer: str = None,
|
duration: int = 0,
|
||||||
title: str = None,
|
performer: str = None,
|
||||||
thumb: str = None,
|
title: str = None,
|
||||||
disable_notification: bool = None,
|
thumb: str = None,
|
||||||
reply_to_message_id: int = None,
|
disable_notification: bool = None,
|
||||||
reply_markup: Union["pyrogram.InlineKeyboardMarkup",
|
reply_to_message_id: int = None,
|
||||||
"pyrogram.ReplyKeyboardMarkup",
|
reply_markup: Union[
|
||||||
"pyrogram.ReplyKeyboardRemove",
|
"pyrogram.InlineKeyboardMarkup",
|
||||||
"pyrogram.ForceReply"] = None,
|
"pyrogram.ReplyKeyboardMarkup",
|
||||||
progress: callable = None,
|
"pyrogram.ReplyKeyboardRemove",
|
||||||
progress_args: tuple = ()) -> Union["pyrogram.Message", None]:
|
"pyrogram.ForceReply"
|
||||||
|
] = None,
|
||||||
|
progress: callable = None,
|
||||||
|
progress_args: tuple = ()
|
||||||
|
) -> Union["pyrogram.Message", None]:
|
||||||
"""Use this method to send audio files.
|
"""Use this method to send audio files.
|
||||||
|
|
||||||
For sending voice messages, use the :obj:`send_voice()` method instead.
|
For sending voice messages, use the :obj:`send_voice()` method instead.
|
||||||
|
@ -23,10 +23,12 @@ from pyrogram.client.ext import BaseClient, ChatAction
|
|||||||
|
|
||||||
|
|
||||||
class SendChatAction(BaseClient):
|
class SendChatAction(BaseClient):
|
||||||
def send_chat_action(self,
|
def send_chat_action(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
action: Union[ChatAction, str],
|
chat_id: Union[int, str],
|
||||||
progress: int = 0):
|
action: Union[ChatAction, str],
|
||||||
|
progress: int = 0
|
||||||
|
):
|
||||||
"""Use this method when you need to tell the other party that something is happening on your side.
|
"""Use this method when you need to tell the other party that something is happening on your side.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -24,18 +24,22 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class SendContact(BaseClient):
|
class SendContact(BaseClient):
|
||||||
def send_contact(self,
|
def send_contact(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
phone_number: str,
|
chat_id: Union[int, str],
|
||||||
first_name: str,
|
phone_number: str,
|
||||||
last_name: str = "",
|
first_name: str,
|
||||||
vcard: str = "",
|
last_name: str = "",
|
||||||
disable_notification: bool = None,
|
vcard: str = "",
|
||||||
reply_to_message_id: int = None,
|
disable_notification: bool = None,
|
||||||
reply_markup: Union["pyrogram.InlineKeyboardMarkup",
|
reply_to_message_id: int = None,
|
||||||
"pyrogram.ReplyKeyboardMarkup",
|
reply_markup: Union[
|
||||||
"pyrogram.ReplyKeyboardRemove",
|
"pyrogram.InlineKeyboardMarkup",
|
||||||
"pyrogram.ForceReply"] = None) -> "pyrogram.Message":
|
"pyrogram.ReplyKeyboardMarkup",
|
||||||
|
"pyrogram.ReplyKeyboardRemove",
|
||||||
|
"pyrogram.ForceReply"
|
||||||
|
] = None
|
||||||
|
) -> "pyrogram.Message":
|
||||||
"""Use this method to send phone contacts.
|
"""Use this method to send phone contacts.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -28,20 +28,24 @@ from pyrogram.client.ext import BaseClient, utils
|
|||||||
|
|
||||||
|
|
||||||
class SendDocument(BaseClient):
|
class SendDocument(BaseClient):
|
||||||
def send_document(self,
|
def send_document(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
document: str,
|
chat_id: Union[int, str],
|
||||||
thumb: str = None,
|
document: str,
|
||||||
caption: str = "",
|
thumb: str = None,
|
||||||
parse_mode: str = "",
|
caption: str = "",
|
||||||
disable_notification: bool = None,
|
parse_mode: str = "",
|
||||||
reply_to_message_id: int = None,
|
disable_notification: bool = None,
|
||||||
reply_markup: Union["pyrogram.InlineKeyboardMarkup",
|
reply_to_message_id: int = None,
|
||||||
"pyrogram.ReplyKeyboardMarkup",
|
reply_markup: Union[
|
||||||
"pyrogram.ReplyKeyboardRemove",
|
"pyrogram.InlineKeyboardMarkup",
|
||||||
"pyrogram.ForceReply"] = None,
|
"pyrogram.ReplyKeyboardMarkup",
|
||||||
progress: callable = None,
|
"pyrogram.ReplyKeyboardRemove",
|
||||||
progress_args: tuple = ()) -> Union["pyrogram.Message", None]:
|
"pyrogram.ForceReply"
|
||||||
|
] = None,
|
||||||
|
progress: callable = None,
|
||||||
|
progress_args: tuple = ()
|
||||||
|
) -> Union["pyrogram.Message", None]:
|
||||||
"""Use this method to send general files.
|
"""Use this method to send general files.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -24,16 +24,20 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class SendLocation(BaseClient):
|
class SendLocation(BaseClient):
|
||||||
def send_location(self,
|
def send_location(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
latitude: float,
|
chat_id: Union[int, str],
|
||||||
longitude: float,
|
latitude: float,
|
||||||
disable_notification: bool = None,
|
longitude: float,
|
||||||
reply_to_message_id: int = None,
|
disable_notification: bool = None,
|
||||||
reply_markup: Union["pyrogram.InlineKeyboardMarkup",
|
reply_to_message_id: int = None,
|
||||||
"pyrogram.ReplyKeyboardMarkup",
|
reply_markup: Union[
|
||||||
"pyrogram.ReplyKeyboardRemove",
|
"pyrogram.InlineKeyboardMarkup",
|
||||||
"pyrogram.ForceReply"] = None) -> "pyrogram.Message":
|
"pyrogram.ReplyKeyboardMarkup",
|
||||||
|
"pyrogram.ReplyKeyboardRemove",
|
||||||
|
"pyrogram.ForceReply"
|
||||||
|
] = None
|
||||||
|
) -> "pyrogram.Message":
|
||||||
"""Use this method to send points on the map.
|
"""Use this method to send points on the map.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -34,11 +34,13 @@ log = logging.getLogger(__name__)
|
|||||||
class SendMediaGroup(BaseClient):
|
class SendMediaGroup(BaseClient):
|
||||||
# TODO: Add progress parameter
|
# TODO: Add progress parameter
|
||||||
# TODO: Figure out how to send albums using URLs
|
# TODO: Figure out how to send albums using URLs
|
||||||
def send_media_group(self,
|
def send_media_group(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
media: List[Union["pyrogram.InputMediaPhoto", "pyrogram.InputMediaVideo"]],
|
chat_id: Union[int, str],
|
||||||
disable_notification: bool = None,
|
media: List[Union["pyrogram.InputMediaPhoto", "pyrogram.InputMediaVideo"]],
|
||||||
reply_to_message_id: int = None):
|
disable_notification: bool = None,
|
||||||
|
reply_to_message_id: int = None
|
||||||
|
):
|
||||||
"""Use this method to send a group of photos or videos as an album.
|
"""Use this method to send a group of photos or videos as an album.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -24,17 +24,21 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class SendMessage(BaseClient):
|
class SendMessage(BaseClient):
|
||||||
def send_message(self,
|
def send_message(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
text: str,
|
chat_id: Union[int, str],
|
||||||
parse_mode: str = "",
|
text: str,
|
||||||
disable_web_page_preview: bool = None,
|
parse_mode: str = "",
|
||||||
disable_notification: bool = None,
|
disable_web_page_preview: bool = None,
|
||||||
reply_to_message_id: int = None,
|
disable_notification: bool = None,
|
||||||
reply_markup: Union["pyrogram.InlineKeyboardMarkup",
|
reply_to_message_id: int = None,
|
||||||
"pyrogram.ReplyKeyboardMarkup",
|
reply_markup: Union[
|
||||||
"pyrogram.ReplyKeyboardRemove",
|
"pyrogram.InlineKeyboardMarkup",
|
||||||
"pyrogram.ForceReply"] = None) -> "pyrogram.Message":
|
"pyrogram.ReplyKeyboardMarkup",
|
||||||
|
"pyrogram.ReplyKeyboardRemove",
|
||||||
|
"pyrogram.ForceReply"
|
||||||
|
] = None
|
||||||
|
) -> "pyrogram.Message":
|
||||||
"""Use this method to send text messages.
|
"""Use this method to send text messages.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -28,20 +28,24 @@ from pyrogram.client.ext import BaseClient, utils
|
|||||||
|
|
||||||
|
|
||||||
class SendPhoto(BaseClient):
|
class SendPhoto(BaseClient):
|
||||||
def send_photo(self,
|
def send_photo(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
photo: str,
|
chat_id: Union[int, str],
|
||||||
caption: str = "",
|
photo: str,
|
||||||
parse_mode: str = "",
|
caption: str = "",
|
||||||
ttl_seconds: int = None,
|
parse_mode: str = "",
|
||||||
disable_notification: bool = None,
|
ttl_seconds: int = None,
|
||||||
reply_to_message_id: int = None,
|
disable_notification: bool = None,
|
||||||
reply_markup: Union["pyrogram.InlineKeyboardMarkup",
|
reply_to_message_id: int = None,
|
||||||
"pyrogram.ReplyKeyboardMarkup",
|
reply_markup: Union[
|
||||||
"pyrogram.ReplyKeyboardRemove",
|
"pyrogram.InlineKeyboardMarkup",
|
||||||
"pyrogram.ForceReply"] = None,
|
"pyrogram.ReplyKeyboardMarkup",
|
||||||
progress: callable = None,
|
"pyrogram.ReplyKeyboardRemove",
|
||||||
progress_args: tuple = ()) -> Union["pyrogram.Message", None]:
|
"pyrogram.ForceReply"
|
||||||
|
] = None,
|
||||||
|
progress: callable = None,
|
||||||
|
progress_args: tuple = ()
|
||||||
|
) -> Union["pyrogram.Message", None]:
|
||||||
"""Use this method to send photos.
|
"""Use this method to send photos.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -24,16 +24,20 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class SendPoll(BaseClient):
|
class SendPoll(BaseClient):
|
||||||
def send_poll(self,
|
def send_poll \
|
||||||
chat_id: Union[int, str],
|
(self,
|
||||||
question: str,
|
chat_id: Union[int, str],
|
||||||
options: List[str],
|
question: str,
|
||||||
disable_notification: bool = None,
|
options: List[str],
|
||||||
reply_to_message_id: int = None,
|
disable_notification: bool = None,
|
||||||
reply_markup: Union["pyrogram.InlineKeyboardMarkup",
|
reply_to_message_id: int = None,
|
||||||
"pyrogram.ReplyKeyboardMarkup",
|
reply_markup: Union[
|
||||||
"pyrogram.ReplyKeyboardRemove",
|
"pyrogram.InlineKeyboardMarkup",
|
||||||
"pyrogram.ForceReply"] = None) -> "pyrogram.Message":
|
"pyrogram.ReplyKeyboardMarkup",
|
||||||
|
"pyrogram.ReplyKeyboardRemove",
|
||||||
|
"pyrogram.ForceReply"
|
||||||
|
] = None
|
||||||
|
) -> "pyrogram.Message":
|
||||||
"""Use this method to send a new poll.
|
"""Use this method to send a new poll.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -28,17 +28,21 @@ from pyrogram.client.ext import BaseClient, utils
|
|||||||
|
|
||||||
|
|
||||||
class SendSticker(BaseClient):
|
class SendSticker(BaseClient):
|
||||||
def send_sticker(self,
|
def send_sticker(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
sticker: str,
|
chat_id: Union[int, str],
|
||||||
disable_notification: bool = None,
|
sticker: str,
|
||||||
reply_to_message_id: int = None,
|
disable_notification: bool = None,
|
||||||
reply_markup: Union["pyrogram.InlineKeyboardMarkup",
|
reply_to_message_id: int = None,
|
||||||
"pyrogram.ReplyKeyboardMarkup",
|
reply_markup: Union[
|
||||||
"pyrogram.ReplyKeyboardRemove",
|
"pyrogram.InlineKeyboardMarkup",
|
||||||
"pyrogram.ForceReply"] = None,
|
"pyrogram.ReplyKeyboardMarkup",
|
||||||
progress: callable = None,
|
"pyrogram.ReplyKeyboardRemove",
|
||||||
progress_args: tuple = ()) -> Union["pyrogram.Message", None]:
|
"pyrogram.ForceReply"
|
||||||
|
] = None,
|
||||||
|
progress: callable = None,
|
||||||
|
progress_args: tuple = ()
|
||||||
|
) -> Union["pyrogram.Message", None]:
|
||||||
"""Use this method to send .webp stickers.
|
"""Use this method to send .webp stickers.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -24,20 +24,24 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class SendVenue(BaseClient):
|
class SendVenue(BaseClient):
|
||||||
def send_venue(self,
|
def send_venue(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
latitude: float,
|
chat_id: Union[int, str],
|
||||||
longitude: float,
|
latitude: float,
|
||||||
title: str,
|
longitude: float,
|
||||||
address: str,
|
title: str,
|
||||||
foursquare_id: str = "",
|
address: str,
|
||||||
foursquare_type: str = "",
|
foursquare_id: str = "",
|
||||||
disable_notification: bool = None,
|
foursquare_type: str = "",
|
||||||
reply_to_message_id: int = None,
|
disable_notification: bool = None,
|
||||||
reply_markup: Union["pyrogram.InlineKeyboardMarkup",
|
reply_to_message_id: int = None,
|
||||||
"pyrogram.ReplyKeyboardMarkup",
|
reply_markup: Union[
|
||||||
"pyrogram.ReplyKeyboardRemove",
|
"pyrogram.InlineKeyboardMarkup",
|
||||||
"pyrogram.ForceReply"] = None) -> "pyrogram.Message":
|
"pyrogram.ReplyKeyboardMarkup",
|
||||||
|
"pyrogram.ReplyKeyboardRemove",
|
||||||
|
"pyrogram.ForceReply"
|
||||||
|
] = None
|
||||||
|
) -> "pyrogram.Message":
|
||||||
"""Use this method to send information about a venue.
|
"""Use this method to send information about a venue.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -28,24 +28,28 @@ from pyrogram.client.ext import BaseClient, utils
|
|||||||
|
|
||||||
|
|
||||||
class SendVideo(BaseClient):
|
class SendVideo(BaseClient):
|
||||||
def send_video(self,
|
def send_video(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
video: str,
|
chat_id: Union[int, str],
|
||||||
caption: str = "",
|
video: str,
|
||||||
parse_mode: str = "",
|
caption: str = "",
|
||||||
duration: int = 0,
|
parse_mode: str = "",
|
||||||
width: int = 0,
|
duration: int = 0,
|
||||||
height: int = 0,
|
width: int = 0,
|
||||||
thumb: str = None,
|
height: int = 0,
|
||||||
supports_streaming: bool = True,
|
thumb: str = None,
|
||||||
disable_notification: bool = None,
|
supports_streaming: bool = True,
|
||||||
reply_to_message_id: int = None,
|
disable_notification: bool = None,
|
||||||
reply_markup: Union["pyrogram.InlineKeyboardMarkup",
|
reply_to_message_id: int = None,
|
||||||
"pyrogram.ReplyKeyboardMarkup",
|
reply_markup: Union[
|
||||||
"pyrogram.ReplyKeyboardRemove",
|
"pyrogram.InlineKeyboardMarkup",
|
||||||
"pyrogram.ForceReply"] = None,
|
"pyrogram.ReplyKeyboardMarkup",
|
||||||
progress: callable = None,
|
"pyrogram.ReplyKeyboardRemove",
|
||||||
progress_args: tuple = ()) -> Union["pyrogram.Message", None]:
|
"pyrogram.ForceReply"
|
||||||
|
] = None,
|
||||||
|
progress: callable = None,
|
||||||
|
progress_args: tuple = ()
|
||||||
|
) -> Union["pyrogram.Message", None]:
|
||||||
"""Use this method to send video files.
|
"""Use this method to send video files.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -28,20 +28,24 @@ from pyrogram.client.ext import BaseClient, utils
|
|||||||
|
|
||||||
|
|
||||||
class SendVideoNote(BaseClient):
|
class SendVideoNote(BaseClient):
|
||||||
def send_video_note(self,
|
def send_video_note(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
video_note: str,
|
chat_id: Union[int, str],
|
||||||
duration: int = 0,
|
video_note: str,
|
||||||
length: int = 1,
|
duration: int = 0,
|
||||||
thumb: str = None,
|
length: int = 1,
|
||||||
disable_notification: bool = None,
|
thumb: str = None,
|
||||||
reply_to_message_id: int = None,
|
disable_notification: bool = None,
|
||||||
reply_markup: Union["pyrogram.InlineKeyboardMarkup",
|
reply_to_message_id: int = None,
|
||||||
"pyrogram.ReplyKeyboardMarkup",
|
reply_markup: Union[
|
||||||
"pyrogram.ReplyKeyboardRemove",
|
"pyrogram.InlineKeyboardMarkup",
|
||||||
"pyrogram.ForceReply"] = None,
|
"pyrogram.ReplyKeyboardMarkup",
|
||||||
progress: callable = None,
|
"pyrogram.ReplyKeyboardRemove",
|
||||||
progress_args: tuple = ()) -> Union["pyrogram.Message", None]:
|
"pyrogram.ForceReply"
|
||||||
|
] = None,
|
||||||
|
progress: callable = None,
|
||||||
|
progress_args: tuple = ()
|
||||||
|
) -> Union["pyrogram.Message", None]:
|
||||||
"""Use this method to send video messages.
|
"""Use this method to send video messages.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -28,20 +28,24 @@ from pyrogram.client.ext import BaseClient, utils
|
|||||||
|
|
||||||
|
|
||||||
class SendVoice(BaseClient):
|
class SendVoice(BaseClient):
|
||||||
def send_voice(self,
|
def send_voice(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
voice: str,
|
chat_id: Union[int, str],
|
||||||
caption: str = "",
|
voice: str,
|
||||||
parse_mode: str = "",
|
caption: str = "",
|
||||||
duration: int = 0,
|
parse_mode: str = "",
|
||||||
disable_notification: bool = None,
|
duration: int = 0,
|
||||||
reply_to_message_id: int = None,
|
disable_notification: bool = None,
|
||||||
reply_markup: Union["pyrogram.InlineKeyboardMarkup",
|
reply_to_message_id: int = None,
|
||||||
"pyrogram.ReplyKeyboardMarkup",
|
reply_markup: Union[
|
||||||
"pyrogram.ReplyKeyboardRemove",
|
"pyrogram.InlineKeyboardMarkup",
|
||||||
"pyrogram.ForceReply"] = None,
|
"pyrogram.ReplyKeyboardMarkup",
|
||||||
progress: callable = None,
|
"pyrogram.ReplyKeyboardRemove",
|
||||||
progress_args: tuple = ()) -> Union["pyrogram.Message", None]:
|
"pyrogram.ForceReply"
|
||||||
|
] = None,
|
||||||
|
progress: callable = None,
|
||||||
|
progress_args: tuple = ()
|
||||||
|
) -> Union["pyrogram.Message", None]:
|
||||||
"""Use this method to send audio files.
|
"""Use this method to send audio files.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -23,10 +23,12 @@ from pyrogram.client.ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class VotePoll(BaseClient):
|
class VotePoll(BaseClient):
|
||||||
def vote_poll(self,
|
def vote_poll(
|
||||||
chat_id: Union[int, str],
|
self,
|
||||||
message_id: id,
|
chat_id: Union[int, str],
|
||||||
option: int) -> bool:
|
message_id: id,
|
||||||
|
option: int
|
||||||
|
) -> bool:
|
||||||
"""Use this method to vote a poll.
|
"""Use this method to vote a poll.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -24,10 +24,12 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class ChangeCloudPassword(BaseClient):
|
class ChangeCloudPassword(BaseClient):
|
||||||
def change_cloud_password(self,
|
def change_cloud_password(
|
||||||
current_password: str,
|
self,
|
||||||
new_password: str,
|
current_password: str,
|
||||||
new_hint: str = "") -> bool:
|
new_password: str,
|
||||||
|
new_hint: str = ""
|
||||||
|
) -> bool:
|
||||||
"""Use this method to change your Two-Step Verification password (Cloud Password) with a new one.
|
"""Use this method to change your Two-Step Verification password (Cloud Password) with a new one.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -24,10 +24,12 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class EnableCloudPassword(BaseClient):
|
class EnableCloudPassword(BaseClient):
|
||||||
def enable_cloud_password(self,
|
def enable_cloud_password(
|
||||||
password: str,
|
self,
|
||||||
hint: str = "",
|
password: str,
|
||||||
email: str = None) -> bool:
|
hint: str = "",
|
||||||
|
email: str = None
|
||||||
|
) -> bool:
|
||||||
"""Use this method to enable the Two-Step Verification security feature (Cloud Password) on your account.
|
"""Use this method to enable the Two-Step Verification security feature (Cloud Password) on your account.
|
||||||
|
|
||||||
This password will be asked when you log-in on a new device in addition to the SMS code.
|
This password will be asked when you log-in on a new device in addition to the SMS code.
|
||||||
|
@ -22,8 +22,10 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class RemoveCloudPassword(BaseClient):
|
class RemoveCloudPassword(BaseClient):
|
||||||
def remove_cloud_password(self,
|
def remove_cloud_password(
|
||||||
password: str) -> bool:
|
self,
|
||||||
|
password: str
|
||||||
|
) -> bool:
|
||||||
"""Use this method to turn off the Two-Step Verification security feature (Cloud Password) on your account.
|
"""Use this method to turn off the Two-Step Verification security feature (Cloud Password) on your account.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -25,8 +25,10 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class DeleteUserProfilePhotos(BaseClient):
|
class DeleteUserProfilePhotos(BaseClient):
|
||||||
def delete_user_profile_photos(self,
|
def delete_user_profile_photos(
|
||||||
id: Union[str, List[str]]) -> bool:
|
self,
|
||||||
|
id: Union[str, List[str]]
|
||||||
|
) -> bool:
|
||||||
"""Use this method to delete your own profile photos
|
"""Use this method to delete your own profile photos
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -24,10 +24,12 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class GetUserProfilePhotos(BaseClient):
|
class GetUserProfilePhotos(BaseClient):
|
||||||
def get_user_profile_photos(self,
|
def get_user_profile_photos(
|
||||||
user_id: Union[int, str],
|
self,
|
||||||
offset: int = 0,
|
user_id: Union[int, str],
|
||||||
limit: int = 100) -> "pyrogram.UserProfilePhotos":
|
offset: int = 0,
|
||||||
|
limit: int = 100
|
||||||
|
) -> "pyrogram.UserProfilePhotos":
|
||||||
"""Use this method to get a list of profile pictures for a user.
|
"""Use this method to get a list of profile pictures for a user.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
@ -24,8 +24,10 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class GetUsers(BaseClient):
|
class GetUsers(BaseClient):
|
||||||
def get_users(self,
|
def get_users(
|
||||||
user_ids: Iterable[Union[int, str]]) -> Union["pyrogram.User", List["pyrogram.User"]]:
|
self,
|
||||||
|
user_ids: Iterable[Union[int, str]]
|
||||||
|
) -> Union["pyrogram.User", List["pyrogram.User"]]:
|
||||||
"""Use this method to get information about a user.
|
"""Use this method to get information about a user.
|
||||||
You can retrieve up to 200 users at once.
|
You can retrieve up to 200 users at once.
|
||||||
|
|
||||||
|
@ -21,8 +21,10 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class SetUserProfilePhoto(BaseClient):
|
class SetUserProfilePhoto(BaseClient):
|
||||||
def set_user_profile_photo(self,
|
def set_user_profile_photo(
|
||||||
photo: str) -> bool:
|
self,
|
||||||
|
photo: str
|
||||||
|
) -> bool:
|
||||||
"""Use this method to set a new profile photo.
|
"""Use this method to set a new profile photo.
|
||||||
|
|
||||||
This method only works for Users.
|
This method only works for Users.
|
||||||
|
@ -23,8 +23,10 @@ from ...ext import BaseClient
|
|||||||
|
|
||||||
|
|
||||||
class UpdateUsername(BaseClient):
|
class UpdateUsername(BaseClient):
|
||||||
def update_username(self,
|
def update_username(
|
||||||
username: Union[str, None]) -> bool:
|
self,
|
||||||
|
username: Union[str, None]
|
||||||
|
) -> bool:
|
||||||
"""Use this method to update your own username.
|
"""Use this method to update your own username.
|
||||||
|
|
||||||
This method only works for users, not bots. Bot usernames must be changed via Bot Support or by recreating
|
This method only works for users, not bots. Bot usernames must be changed via Bot Support or by recreating
|
||||||
|
@ -61,16 +61,16 @@ class CallbackQuery(PyrogramType, Update):
|
|||||||
__slots__ = ["id", "from_user", "chat_instance", "message", "inline_message_id", "data", "game_short_name"]
|
__slots__ = ["id", "from_user", "chat_instance", "message", "inline_message_id", "data", "game_short_name"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
client: "pyrogram.client.ext.BaseClient",
|
client: "pyrogram.client.ext.BaseClient",
|
||||||
id: str,
|
id: str,
|
||||||
from_user: User,
|
from_user: User,
|
||||||
chat_instance: str,
|
chat_instance: str,
|
||||||
message: "pyrogram.Message" = None,
|
message: "pyrogram.Message" = None,
|
||||||
inline_message_id: str = None,
|
inline_message_id: str = None,
|
||||||
data: bytes = None,
|
data: bytes = None,
|
||||||
game_short_name: str = None
|
game_short_name: str = None
|
||||||
):
|
):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
|
@ -36,8 +36,8 @@ class ForceReply(PyrogramType):
|
|||||||
__slots__ = ["selective"]
|
__slots__ = ["selective"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
selective: bool = None
|
selective: bool = None
|
||||||
):
|
):
|
||||||
super().__init__(None)
|
super().__init__(None)
|
||||||
|
|
||||||
|
@ -40,12 +40,12 @@ class GameHighScore(PyrogramType):
|
|||||||
__slots__ = ["user", "score", "position"]
|
__slots__ = ["user", "score", "position"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
client: "pyrogram.client.ext.BaseClient",
|
client: "pyrogram.client.ext.BaseClient",
|
||||||
user: User,
|
user: User,
|
||||||
score: int,
|
score: int,
|
||||||
position: int = None
|
position: int = None
|
||||||
):
|
):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
|
@ -38,11 +38,11 @@ class GameHighScores(PyrogramType):
|
|||||||
__slots__ = ["total_count", "game_high_scores"]
|
__slots__ = ["total_count", "game_high_scores"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
client: "pyrogram.client.ext.BaseClient",
|
client: "pyrogram.client.ext.BaseClient",
|
||||||
total_count: int,
|
total_count: int,
|
||||||
game_high_scores: List[GameHighScore]
|
game_high_scores: List[GameHighScore]
|
||||||
):
|
):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
|
@ -59,13 +59,13 @@ class InlineKeyboardButton(PyrogramType):
|
|||||||
]
|
]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
text: str,
|
text: str,
|
||||||
callback_data: bytes = None,
|
callback_data: bytes = None,
|
||||||
url: str = None,
|
url: str = None,
|
||||||
switch_inline_query: str = None,
|
switch_inline_query: str = None,
|
||||||
switch_inline_query_current_chat: str = None,
|
switch_inline_query_current_chat: str = None,
|
||||||
callback_game: CallbackGame = None
|
callback_game: CallbackGame = None
|
||||||
):
|
):
|
||||||
super().__init__(None)
|
super().__init__(None)
|
||||||
|
|
||||||
|
@ -34,8 +34,8 @@ class InlineKeyboardMarkup(PyrogramType):
|
|||||||
__slots__ = ["inline_keyboard"]
|
__slots__ = ["inline_keyboard"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
inline_keyboard: List[List[InlineKeyboardButton]]
|
inline_keyboard: List[List[InlineKeyboardButton]]
|
||||||
):
|
):
|
||||||
super().__init__(None)
|
super().__init__(None)
|
||||||
|
|
||||||
|
@ -43,10 +43,10 @@ class KeyboardButton(PyrogramType):
|
|||||||
__slots__ = ["text", "request_contact", "request_location"]
|
__slots__ = ["text", "request_contact", "request_location"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
text: str,
|
text: str,
|
||||||
request_contact: bool = None,
|
request_contact: bool = None,
|
||||||
request_location: bool = None
|
request_location: bool = None
|
||||||
):
|
):
|
||||||
super().__init__(None)
|
super().__init__(None)
|
||||||
|
|
||||||
|
@ -52,11 +52,11 @@ class ReplyKeyboardMarkup(PyrogramType):
|
|||||||
__slots__ = ["keyboard", "resize_keyboard", "one_time_keyboard", "selective"]
|
__slots__ = ["keyboard", "resize_keyboard", "one_time_keyboard", "selective"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
keyboard: List[List[Union[KeyboardButton, str]]],
|
keyboard: List[List[Union[KeyboardButton, str]]],
|
||||||
resize_keyboard: bool = None,
|
resize_keyboard: bool = None,
|
||||||
one_time_keyboard: bool = None,
|
one_time_keyboard: bool = None,
|
||||||
selective: bool = None
|
selective: bool = None
|
||||||
):
|
):
|
||||||
super().__init__(None)
|
super().__init__(None)
|
||||||
|
|
||||||
|
@ -38,8 +38,8 @@ class ReplyKeyboardRemove(PyrogramType):
|
|||||||
__slots__ = ["selective"]
|
__slots__ = ["selective"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
selective: bool = None
|
selective: bool = None
|
||||||
):
|
):
|
||||||
super().__init__(None)
|
super().__init__(None)
|
||||||
|
|
||||||
|
@ -21,10 +21,10 @@ class InputMedia:
|
|||||||
__slots__ = ["media", "caption", "parse_mode"]
|
__slots__ = ["media", "caption", "parse_mode"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
media: str,
|
media: str,
|
||||||
caption: str,
|
caption: str,
|
||||||
parse_mode: str
|
parse_mode: str
|
||||||
):
|
):
|
||||||
self.media = media
|
self.media = media
|
||||||
self.caption = caption
|
self.caption = caption
|
||||||
|
@ -55,14 +55,14 @@ class InputMediaAnimation(InputMedia):
|
|||||||
__slots__ = ["thumb", "width", "height", "duration"]
|
__slots__ = ["thumb", "width", "height", "duration"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
media: str,
|
media: str,
|
||||||
thumb: str = None,
|
thumb: str = None,
|
||||||
caption: str = "",
|
caption: str = "",
|
||||||
parse_mode: str = "",
|
parse_mode: str = "",
|
||||||
width: int = 0,
|
width: int = 0,
|
||||||
height: int = 0,
|
height: int = 0,
|
||||||
duration: int = 0
|
duration: int = 0
|
||||||
):
|
):
|
||||||
super().__init__(media, caption, parse_mode)
|
super().__init__(media, caption, parse_mode)
|
||||||
|
|
||||||
|
@ -56,14 +56,14 @@ class InputMediaAudio(InputMedia):
|
|||||||
__slots__ = ["thumb", "duration", "performer", "title"]
|
__slots__ = ["thumb", "duration", "performer", "title"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
media: str,
|
media: str,
|
||||||
thumb: str = None,
|
thumb: str = None,
|
||||||
caption: str = "",
|
caption: str = "",
|
||||||
parse_mode: str = "",
|
parse_mode: str = "",
|
||||||
duration: int = 0,
|
duration: int = 0,
|
||||||
performer: int = "",
|
performer: int = "",
|
||||||
title: str = ""
|
title: str = ""
|
||||||
):
|
):
|
||||||
super().__init__(media, caption, parse_mode)
|
super().__init__(media, caption, parse_mode)
|
||||||
|
|
||||||
|
@ -46,11 +46,11 @@ class InputMediaDocument(InputMedia):
|
|||||||
__slots__ = ["thumb"]
|
__slots__ = ["thumb"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
media: str,
|
media: str,
|
||||||
thumb: str = None,
|
thumb: str = None,
|
||||||
caption: str = "",
|
caption: str = "",
|
||||||
parse_mode: str = ""
|
parse_mode: str = ""
|
||||||
):
|
):
|
||||||
super().__init__(media, caption, parse_mode)
|
super().__init__(media, caption, parse_mode)
|
||||||
|
|
||||||
|
@ -42,9 +42,9 @@ class InputMediaPhoto(InputMedia):
|
|||||||
__slots__ = []
|
__slots__ = []
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
media: str,
|
media: str,
|
||||||
caption: str = "",
|
caption: str = "",
|
||||||
parse_mode: str = ""
|
parse_mode: str = ""
|
||||||
):
|
):
|
||||||
super().__init__(media, caption, parse_mode)
|
super().__init__(media, caption, parse_mode)
|
||||||
|
@ -60,15 +60,15 @@ class InputMediaVideo(InputMedia):
|
|||||||
__slots__ = ["thumb", "width", "height", "duration", "supports_streaming"]
|
__slots__ = ["thumb", "width", "height", "duration", "supports_streaming"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
media: str,
|
media: str,
|
||||||
thumb: str = None,
|
thumb: str = None,
|
||||||
caption: str = "",
|
caption: str = "",
|
||||||
parse_mode: str = "",
|
parse_mode: str = "",
|
||||||
width: int = 0,
|
width: int = 0,
|
||||||
height: int = 0,
|
height: int = 0,
|
||||||
duration: int = 0,
|
duration: int = 0,
|
||||||
supports_streaming: bool = True
|
supports_streaming: bool = True
|
||||||
):
|
):
|
||||||
super().__init__(media, caption, parse_mode)
|
super().__init__(media, caption, parse_mode)
|
||||||
|
|
||||||
|
@ -38,10 +38,10 @@ class InputPhoneContact:
|
|||||||
__slots__ = []
|
__slots__ = []
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
phone: str,
|
phone: str,
|
||||||
first_name: str,
|
first_name: str,
|
||||||
last_name: str = ""
|
last_name: str = ""
|
||||||
):
|
):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -60,18 +60,18 @@ class Animation(PyrogramType):
|
|||||||
__slots__ = ["file_id", "thumb", "file_name", "mime_type", "file_size", "date", "width", "height", "duration"]
|
__slots__ = ["file_id", "thumb", "file_name", "mime_type", "file_size", "date", "width", "height", "duration"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
client: "pyrogram.client.ext.BaseClient",
|
client: "pyrogram.client.ext.BaseClient",
|
||||||
file_id: str,
|
file_id: str,
|
||||||
width: int,
|
width: int,
|
||||||
height: int,
|
height: int,
|
||||||
duration: int,
|
duration: int,
|
||||||
thumb: PhotoSize = None,
|
thumb: PhotoSize = None,
|
||||||
file_name: str = None,
|
file_name: str = None,
|
||||||
mime_type: str = None,
|
mime_type: str = None,
|
||||||
file_size: int = None,
|
file_size: int = None,
|
||||||
date: int = None
|
date: int = None
|
||||||
):
|
):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
|
@ -60,18 +60,18 @@ class Audio(PyrogramType):
|
|||||||
__slots__ = ["file_id", "thumb", "file_name", "mime_type", "file_size", "date", "duration", "performer", "title"]
|
__slots__ = ["file_id", "thumb", "file_name", "mime_type", "file_size", "date", "duration", "performer", "title"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
client: "pyrogram.client.ext.BaseClient",
|
client: "pyrogram.client.ext.BaseClient",
|
||||||
file_id: str,
|
file_id: str,
|
||||||
duration: int,
|
duration: int,
|
||||||
thumb: PhotoSize = None,
|
thumb: PhotoSize = None,
|
||||||
file_name: str = None,
|
file_name: str = None,
|
||||||
mime_type: str = None,
|
mime_type: str = None,
|
||||||
file_size: int = None,
|
file_size: int = None,
|
||||||
date: int = None,
|
date: int = None,
|
||||||
performer: str = None,
|
performer: str = None,
|
||||||
title: str = None
|
title: str = None
|
||||||
):
|
):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
|
@ -45,14 +45,14 @@ class Contact(PyrogramType):
|
|||||||
__slots__ = ["phone_number", "first_name", "last_name", "user_id", "vcard"]
|
__slots__ = ["phone_number", "first_name", "last_name", "user_id", "vcard"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
client: "pyrogram.client.ext.BaseClient",
|
client: "pyrogram.client.ext.BaseClient",
|
||||||
phone_number: str,
|
phone_number: str,
|
||||||
first_name: str,
|
first_name: str,
|
||||||
last_name: str = None,
|
last_name: str = None,
|
||||||
user_id: int = None,
|
user_id: int = None,
|
||||||
vcard: str = None
|
vcard: str = None
|
||||||
):
|
):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
|
@ -51,15 +51,15 @@ class Document(PyrogramType):
|
|||||||
__slots__ = ["file_id", "thumb", "file_name", "mime_type", "file_size", "date"]
|
__slots__ = ["file_id", "thumb", "file_name", "mime_type", "file_size", "date"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
client: "pyrogram.client.ext.BaseClient",
|
client: "pyrogram.client.ext.BaseClient",
|
||||||
file_id: str,
|
file_id: str,
|
||||||
thumb: PhotoSize = None,
|
thumb: PhotoSize = None,
|
||||||
file_name: str = None,
|
file_name: str = None,
|
||||||
mime_type: str = None,
|
mime_type: str = None,
|
||||||
file_size: int = None,
|
file_size: int = None,
|
||||||
date: int = None
|
date: int = None
|
||||||
):
|
):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
|
@ -51,15 +51,15 @@ class Game(PyrogramType):
|
|||||||
__slots__ = ["id", "title", "short_name", "description", "photo", "animation"]
|
__slots__ = ["id", "title", "short_name", "description", "photo", "animation"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
client: "pyrogram.client.ext.BaseClient",
|
client: "pyrogram.client.ext.BaseClient",
|
||||||
id: int,
|
id: int,
|
||||||
title: str,
|
title: str,
|
||||||
short_name: str,
|
short_name: str,
|
||||||
description: str,
|
description: str,
|
||||||
photo: Photo,
|
photo: Photo,
|
||||||
animation: Animation = None
|
animation: Animation = None
|
||||||
):
|
):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
|
@ -36,11 +36,11 @@ class Location(PyrogramType):
|
|||||||
__slots__ = ["longitude", "latitude"]
|
__slots__ = ["longitude", "latitude"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
client: "pyrogram.client.ext.BaseClient",
|
client: "pyrogram.client.ext.BaseClient",
|
||||||
longitude: float,
|
longitude: float,
|
||||||
latitude: float
|
latitude: float
|
||||||
):
|
):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
|
@ -246,67 +246,67 @@ class Message(PyrogramType, Update):
|
|||||||
]
|
]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
client: "pyrogram.client.ext.BaseClient",
|
client: "pyrogram.client.ext.BaseClient",
|
||||||
message_id: int,
|
message_id: int,
|
||||||
date: int = None,
|
date: int = None,
|
||||||
chat: Chat = None,
|
chat: Chat = None,
|
||||||
from_user: User = None,
|
from_user: User = None,
|
||||||
forward_from: User = None,
|
forward_from: User = None,
|
||||||
forward_from_chat: Chat = None,
|
forward_from_chat: Chat = None,
|
||||||
forward_from_message_id: int = None,
|
forward_from_message_id: int = None,
|
||||||
forward_signature: str = None,
|
forward_signature: str = None,
|
||||||
forward_date: int = None,
|
forward_date: int = None,
|
||||||
reply_to_message: "Message" = None,
|
reply_to_message: "Message" = None,
|
||||||
mentioned: bool = None,
|
mentioned: bool = None,
|
||||||
empty: bool = None,
|
empty: bool = None,
|
||||||
service: bool = None,
|
service: bool = None,
|
||||||
media: bool = None,
|
media: bool = None,
|
||||||
edit_date: int = None,
|
edit_date: int = None,
|
||||||
media_group_id: str = None,
|
media_group_id: str = None,
|
||||||
author_signature: str = None,
|
author_signature: str = None,
|
||||||
text: str = None,
|
text: str = None,
|
||||||
entities: List["pyrogram.MessageEntity"] = None,
|
entities: List["pyrogram.MessageEntity"] = None,
|
||||||
caption_entities: List["pyrogram.MessageEntity"] = None,
|
caption_entities: List["pyrogram.MessageEntity"] = None,
|
||||||
audio: "pyrogram.Audio" = None,
|
audio: "pyrogram.Audio" = None,
|
||||||
document: "pyrogram.Document" = None,
|
document: "pyrogram.Document" = None,
|
||||||
photo: "pyrogram.Photo" = None,
|
photo: "pyrogram.Photo" = None,
|
||||||
sticker: "pyrogram.Sticker" = None,
|
sticker: "pyrogram.Sticker" = None,
|
||||||
animation: "pyrogram.Animation" = None,
|
animation: "pyrogram.Animation" = None,
|
||||||
game: "pyrogram.Game" = None,
|
game: "pyrogram.Game" = None,
|
||||||
video: "pyrogram.Video" = None,
|
video: "pyrogram.Video" = None,
|
||||||
voice: "pyrogram.Voice" = None,
|
voice: "pyrogram.Voice" = None,
|
||||||
video_note: "pyrogram.VideoNote" = None,
|
video_note: "pyrogram.VideoNote" = None,
|
||||||
caption: str = None,
|
caption: str = None,
|
||||||
contact: "pyrogram.Contact" = None,
|
contact: "pyrogram.Contact" = None,
|
||||||
location: "pyrogram.Location" = None,
|
location: "pyrogram.Location" = None,
|
||||||
venue: "pyrogram.Venue" = None,
|
venue: "pyrogram.Venue" = None,
|
||||||
web_page: bool = None,
|
web_page: bool = None,
|
||||||
poll: "pyrogram.Poll" = None,
|
poll: "pyrogram.Poll" = None,
|
||||||
new_chat_members: List[User] = None,
|
new_chat_members: List[User] = None,
|
||||||
left_chat_member: User = None,
|
left_chat_member: User = None,
|
||||||
new_chat_title: str = None,
|
new_chat_title: str = None,
|
||||||
new_chat_photo: "pyrogram.Photo" = None,
|
new_chat_photo: "pyrogram.Photo" = None,
|
||||||
delete_chat_photo: bool = None,
|
delete_chat_photo: bool = None,
|
||||||
group_chat_created: bool = None,
|
group_chat_created: bool = None,
|
||||||
supergroup_chat_created: bool = None,
|
supergroup_chat_created: bool = None,
|
||||||
channel_chat_created: bool = None,
|
channel_chat_created: bool = None,
|
||||||
migrate_to_chat_id: int = None,
|
migrate_to_chat_id: int = None,
|
||||||
migrate_from_chat_id: int = None,
|
migrate_from_chat_id: int = None,
|
||||||
pinned_message: "Message" = None,
|
pinned_message: "Message" = None,
|
||||||
game_high_score: int = None,
|
game_high_score: int = None,
|
||||||
views: int = None,
|
views: int = None,
|
||||||
via_bot: User = None,
|
via_bot: User = None,
|
||||||
outgoing: bool = None,
|
outgoing: bool = None,
|
||||||
matches: List[Match] = None,
|
matches: List[Match] = None,
|
||||||
command: List[str] = None,
|
command: List[str] = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
"pyrogram.InlineKeyboardMarkup",
|
"pyrogram.InlineKeyboardMarkup",
|
||||||
"pyrogram.ReplyKeyboardMarkup",
|
"pyrogram.ReplyKeyboardMarkup",
|
||||||
"pyrogram.ReplyKeyboardRemove",
|
"pyrogram.ReplyKeyboardRemove",
|
||||||
"pyrogram.ForceReply"
|
"pyrogram.ForceReply"
|
||||||
] = None
|
] = None
|
||||||
):
|
):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
|
@ -66,14 +66,14 @@ class MessageEntity(PyrogramType):
|
|||||||
}
|
}
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
client: "pyrogram.client.ext.BaseClient",
|
client: "pyrogram.client.ext.BaseClient",
|
||||||
type: str,
|
type: str,
|
||||||
offset: int,
|
offset: int,
|
||||||
length: int,
|
length: int,
|
||||||
url: str = None,
|
url: str = None,
|
||||||
user: User = None
|
user: User = None
|
||||||
):
|
):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
|
@ -40,11 +40,11 @@ class Messages(PyrogramType, Update):
|
|||||||
__slots__ = ["total_count", "messages"]
|
__slots__ = ["total_count", "messages"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
client: "pyrogram.client.ext.BaseClient",
|
client: "pyrogram.client.ext.BaseClient",
|
||||||
total_count: int,
|
total_count: int,
|
||||||
messages: List[Message]
|
messages: List[Message]
|
||||||
):
|
):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
|
@ -44,12 +44,12 @@ class Photo(PyrogramType):
|
|||||||
__slots__ = ["id", "date", "sizes"]
|
__slots__ = ["id", "date", "sizes"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
client: "pyrogram.client.ext.BaseClient",
|
client: "pyrogram.client.ext.BaseClient",
|
||||||
id: str,
|
id: str,
|
||||||
date: int,
|
date: int,
|
||||||
sizes: List[PhotoSize]
|
sizes: List[PhotoSize]
|
||||||
):
|
):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
|
@ -45,13 +45,13 @@ class PhotoSize(PyrogramType):
|
|||||||
__slots__ = ["file_id", "width", "height", "file_size"]
|
__slots__ = ["file_id", "width", "height", "file_size"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
client: "pyrogram.client.ext.BaseClient",
|
client: "pyrogram.client.ext.BaseClient",
|
||||||
file_id: str,
|
file_id: str,
|
||||||
width: int,
|
width: int,
|
||||||
height: int,
|
height: int,
|
||||||
file_size: int
|
file_size: int
|
||||||
):
|
):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
|
@ -50,15 +50,15 @@ class Poll(PyrogramType):
|
|||||||
__slots__ = ["id", "closed", "question", "options", "total_voters", "option_chosen"]
|
__slots__ = ["id", "closed", "question", "options", "total_voters", "option_chosen"]
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
client: "pyrogram.client.ext.BaseClient",
|
client: "pyrogram.client.ext.BaseClient",
|
||||||
id: int,
|
id: int,
|
||||||
closed: bool,
|
closed: bool,
|
||||||
question: str,
|
question: str,
|
||||||
options: List[PollOption],
|
options: List[PollOption],
|
||||||
total_voters: int,
|
total_voters: int,
|
||||||
option_chosen: int = None
|
option_chosen: int = None
|
||||||
):
|
):
|
||||||
super().__init__(client)
|
super().__init__(client)
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user