2019-05-09 13:24:37 +03:00
|
|
|
.. _client-ref:
|
|
|
|
|
|
|
|
================
|
|
|
|
Client Reference
|
|
|
|
================
|
|
|
|
|
|
|
|
This page contains a summary of all the important methods and properties that
|
|
|
|
you may need when using Telethon. They are sorted by relevance and are not in
|
|
|
|
alphabetical order.
|
|
|
|
|
|
|
|
You should use this page to learn about which methods are available, and
|
2020-10-18 22:11:59 +03:00
|
|
|
if you need a usage example or further description of the arguments, be
|
2019-05-09 13:24:37 +03:00
|
|
|
sure to follow the links.
|
|
|
|
|
|
|
|
.. contents::
|
|
|
|
|
|
|
|
TelegramClient
|
|
|
|
==============
|
|
|
|
|
|
|
|
This is a summary of the methods and
|
|
|
|
properties you will find at :ref:`telethon-client`.
|
|
|
|
|
|
|
|
Auth
|
|
|
|
----
|
|
|
|
|
|
|
|
.. currentmodule:: telethon.client.auth.AuthMethods
|
|
|
|
|
|
|
|
.. autosummary::
|
|
|
|
:nosignatures:
|
|
|
|
|
|
|
|
start
|
|
|
|
send_code_request
|
|
|
|
sign_in
|
2020-06-06 14:07:36 +03:00
|
|
|
qr_login
|
2019-05-09 13:24:37 +03:00
|
|
|
sign_up
|
|
|
|
log_out
|
|
|
|
edit_2fa
|
|
|
|
|
|
|
|
Base
|
|
|
|
----
|
|
|
|
|
|
|
|
.. py:currentmodule:: telethon.client.telegrambaseclient.TelegramBaseClient
|
|
|
|
|
|
|
|
.. autosummary::
|
|
|
|
:nosignatures:
|
|
|
|
|
|
|
|
connect
|
|
|
|
disconnect
|
|
|
|
is_connected
|
|
|
|
disconnected
|
|
|
|
loop
|
2020-11-28 15:07:36 +03:00
|
|
|
set_proxy
|
2019-05-09 13:24:37 +03:00
|
|
|
|
|
|
|
Messages
|
|
|
|
--------
|
|
|
|
|
|
|
|
.. py:currentmodule:: telethon.client.messages.MessageMethods
|
|
|
|
|
|
|
|
.. autosummary::
|
|
|
|
:nosignatures:
|
|
|
|
|
|
|
|
send_message
|
|
|
|
edit_message
|
|
|
|
delete_messages
|
|
|
|
forward_messages
|
|
|
|
iter_messages
|
|
|
|
get_messages
|
2019-05-30 18:15:50 +03:00
|
|
|
pin_message
|
2020-11-05 12:49:34 +03:00
|
|
|
unpin_message
|
2019-05-09 13:24:37 +03:00
|
|
|
send_read_acknowledge
|
|
|
|
|
|
|
|
Uploads
|
|
|
|
-------
|
|
|
|
|
|
|
|
.. py:currentmodule:: telethon.client.uploads.UploadMethods
|
|
|
|
|
|
|
|
.. autosummary::
|
|
|
|
:nosignatures:
|
|
|
|
|
|
|
|
send_file
|
|
|
|
upload_file
|
|
|
|
|
|
|
|
Downloads
|
|
|
|
---------
|
|
|
|
|
|
|
|
.. currentmodule:: telethon.client.downloads.DownloadMethods
|
|
|
|
|
|
|
|
.. autosummary::
|
|
|
|
:nosignatures:
|
|
|
|
|
|
|
|
download_media
|
|
|
|
download_profile_photo
|
|
|
|
download_file
|
2020-01-19 15:25:58 +03:00
|
|
|
iter_download
|
2019-05-09 13:24:37 +03:00
|
|
|
|
|
|
|
Dialogs
|
|
|
|
-------
|
|
|
|
|
|
|
|
.. py:currentmodule:: telethon.client.dialogs.DialogMethods
|
|
|
|
|
|
|
|
.. autosummary::
|
|
|
|
:nosignatures:
|
|
|
|
|
|
|
|
iter_dialogs
|
|
|
|
get_dialogs
|
2019-10-21 12:45:08 +03:00
|
|
|
edit_folder
|
2019-05-09 13:24:37 +03:00
|
|
|
iter_drafts
|
|
|
|
get_drafts
|
2019-05-30 17:51:19 +03:00
|
|
|
delete_dialog
|
2019-05-09 13:24:37 +03:00
|
|
|
|
|
|
|
Users
|
|
|
|
-----
|
|
|
|
|
|
|
|
.. py:currentmodule:: telethon.client.users.UserMethods
|
|
|
|
|
|
|
|
.. autosummary::
|
|
|
|
:nosignatures:
|
|
|
|
|
|
|
|
get_me
|
|
|
|
is_bot
|
|
|
|
is_user_authorized
|
|
|
|
get_entity
|
|
|
|
get_input_entity
|
|
|
|
get_peer_id
|
|
|
|
|
|
|
|
Chats
|
|
|
|
-----
|
|
|
|
|
|
|
|
.. currentmodule:: telethon.client.chats.ChatMethods
|
|
|
|
|
|
|
|
.. autosummary::
|
|
|
|
:nosignatures:
|
|
|
|
|
|
|
|
iter_participants
|
|
|
|
get_participants
|
2020-01-19 15:25:58 +03:00
|
|
|
kick_participant
|
2019-05-09 13:24:37 +03:00
|
|
|
iter_admin_log
|
|
|
|
get_admin_log
|
2019-05-30 17:51:19 +03:00
|
|
|
iter_profile_photos
|
|
|
|
get_profile_photos
|
2019-07-06 20:30:21 +03:00
|
|
|
edit_admin
|
|
|
|
edit_permissions
|
2020-10-05 11:52:42 +03:00
|
|
|
get_permissions
|
2020-07-26 14:45:30 +03:00
|
|
|
get_stats
|
2019-05-09 13:24:37 +03:00
|
|
|
action
|
|
|
|
|
|
|
|
Parse Mode
|
|
|
|
----------
|
|
|
|
|
|
|
|
.. py:currentmodule:: telethon.client.messageparse.MessageParseMethods
|
|
|
|
|
|
|
|
.. autosummary::
|
|
|
|
:nosignatures:
|
|
|
|
|
|
|
|
parse_mode
|
|
|
|
|
|
|
|
Updates
|
|
|
|
-------
|
|
|
|
|
|
|
|
.. py:currentmodule:: telethon.client.updates.UpdateMethods
|
|
|
|
|
|
|
|
.. autosummary::
|
|
|
|
:nosignatures:
|
|
|
|
|
|
|
|
on
|
|
|
|
run_until_disconnected
|
|
|
|
add_event_handler
|
|
|
|
remove_event_handler
|
|
|
|
list_event_handlers
|
|
|
|
catch_up
|
2021-09-11 12:02:10 +03:00
|
|
|
set_receive_updates
|
2019-05-09 13:24:37 +03:00
|
|
|
|
|
|
|
Bots
|
|
|
|
----
|
|
|
|
|
|
|
|
.. currentmodule:: telethon.client.bots.BotMethods
|
|
|
|
|
|
|
|
.. autosummary::
|
|
|
|
:nosignatures:
|
|
|
|
|
|
|
|
inline_query
|
|
|
|
|
|
|
|
Buttons
|
|
|
|
-------
|
|
|
|
|
|
|
|
.. currentmodule:: telethon.client.buttons.ButtonMethods
|
|
|
|
|
|
|
|
.. autosummary::
|
|
|
|
:nosignatures:
|
|
|
|
|
|
|
|
build_reply_markup
|
|
|
|
|
|
|
|
Account
|
|
|
|
-------
|
|
|
|
|
|
|
|
.. currentmodule:: telethon.client.account.AccountMethods
|
|
|
|
|
|
|
|
.. autosummary::
|
|
|
|
:nosignatures:
|
|
|
|
|
|
|
|
takeout
|
|
|
|
end_takeout
|