mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-01 06:45:39 +00:00
Various improvements
This commit is contained in:
@@ -158,6 +158,7 @@ def pyrogram_api():
|
||||
send_venue
|
||||
send_contact
|
||||
send_cached_media
|
||||
send_reaction
|
||||
edit_message_text
|
||||
edit_message_caption
|
||||
edit_message_media
|
||||
@@ -180,7 +181,9 @@ def pyrogram_api():
|
||||
retract_vote
|
||||
send_dice
|
||||
search_messages
|
||||
search_messages_count
|
||||
search_global
|
||||
search_global_count
|
||||
download_media
|
||||
get_discussion_message
|
||||
""",
|
||||
@@ -284,6 +287,7 @@ def pyrogram_api():
|
||||
send_game
|
||||
set_game_score
|
||||
get_game_high_scores
|
||||
set_bot_commands
|
||||
""",
|
||||
authorization="""
|
||||
Authorization
|
||||
@@ -360,6 +364,7 @@ def pyrogram_api():
|
||||
ChatEvent
|
||||
ChatEventFilter
|
||||
ChatMemberUpdated
|
||||
ChatJoinRequest
|
||||
Dialog
|
||||
Restriction
|
||||
""",
|
||||
@@ -384,6 +389,7 @@ def pyrogram_api():
|
||||
Poll
|
||||
PollOption
|
||||
Dice
|
||||
Reaction
|
||||
VoiceChatScheduled
|
||||
VoiceChatStarted
|
||||
VoiceChatEnded
|
||||
@@ -420,6 +426,8 @@ def pyrogram_api():
|
||||
InlineQueryResultArticle
|
||||
InlineQueryResultPhoto
|
||||
InlineQueryResultAnimation
|
||||
InlineQueryResultAudio
|
||||
InlineQueryResultVideo
|
||||
ChosenInlineResult
|
||||
""",
|
||||
input_message_content="""
|
||||
|
7
compiler/docs/template/bound-methods.rst
vendored
7
compiler/docs/template/bound-methods.rst
vendored
@@ -1,12 +1,11 @@
|
||||
Bound Methods
|
||||
=============
|
||||
|
||||
Some Pyrogram types define what are called bound methods. Bound methods are functions attached to a class which are
|
||||
accessed via an instance of that class. They make it even easier to call specific methods by automatically inferring
|
||||
Some Pyrogram types define what are called bound methods. Bound methods are functions attached to a type which are
|
||||
accessed via an instance of that type. They make it even easier to call specific methods by automatically inferring
|
||||
some of the required arguments.
|
||||
|
||||
.. code-block:: python
|
||||
:emphasize-lines: 8
|
||||
|
||||
from pyrogram import Client
|
||||
|
||||
@@ -15,7 +14,7 @@ some of the required arguments.
|
||||
|
||||
@app.on_message()
|
||||
def hello(client, message)
|
||||
message.reply_text("hi")
|
||||
message.reply("hi")
|
||||
|
||||
|
||||
app.run()
|
||||
|
7
compiler/docs/template/methods.rst
vendored
7
compiler/docs/template/methods.rst
vendored
@@ -1,18 +1,17 @@
|
||||
Available Methods
|
||||
=================
|
||||
|
||||
This page is about Pyrogram methods. All the methods listed here are bound to a :class:`~pyrogram.Client` instance,
|
||||
except for :meth:`~pyrogram.idle()`, which is a special function that can be found in the main package directly.
|
||||
This page is about Pyrogram methods. All the methods listed here are bound to a :class:`~pyrogram.Client` instance.
|
||||
Some other utility functions can instead be found in the main package directly.
|
||||
|
||||
.. code-block:: python
|
||||
:emphasize-lines: 6
|
||||
|
||||
from pyrogram import Client
|
||||
|
||||
app = Client("my_account")
|
||||
|
||||
with app:
|
||||
app.send_message("haskell", "hi")
|
||||
app.send_message("me", "hi")
|
||||
|
||||
.. contents:: Contents
|
||||
:backlinks: none
|
||||
|
1
compiler/docs/template/types.rst
vendored
1
compiler/docs/template/types.rst
vendored
@@ -6,7 +6,6 @@ Unless required as argument to a client method, most of the types don't need to
|
||||
are only returned by other methods. You also don't need to import them, unless you want to type-hint your variables.
|
||||
|
||||
.. code-block:: python
|
||||
:emphasize-lines: 1
|
||||
|
||||
from pyrogram.types import User, Message, ...
|
||||
|
||||
|
@@ -62,6 +62,7 @@ CHAT_NOT_MODIFIED The chat settings (title, permissions, photo, etc..) were not
|
||||
CHAT_RESTRICTED The chat is restricted and cannot be used
|
||||
CHAT_SEND_INLINE_FORBIDDEN You cannot use inline bots to send messages in this chat
|
||||
CHAT_TITLE_EMPTY The chat title is empty
|
||||
CHAT_TOO_BIG The chat is too big for this action
|
||||
CODE_EMPTY The provided code is empty
|
||||
CODE_HASH_INVALID The provided code hash invalid
|
||||
CODE_INVALID The provided code is invalid (i.e. from email)
|
||||
@@ -347,4 +348,4 @@ WEBDOCUMENT_URL_EMPTY The web document URL is empty
|
||||
WEBDOCUMENT_URL_INVALID The web document URL is invalid
|
||||
WEBPAGE_CURL_FAILED Telegram server could not fetch the provided URL
|
||||
WEBPAGE_MEDIA_EMPTY The URL doesn't contain any valid media
|
||||
YOU_BLOCKED_USER You blocked this user
|
||||
YOU_BLOCKED_USER You blocked this user
|
|
@@ -2,7 +2,7 @@ id message
|
||||
ACTIVE_USER_REQUIRED The method is only available to already activated users
|
||||
AUTH_KEY_INVALID The key is invalid
|
||||
AUTH_KEY_PERM_EMPTY The method is unavailable for temporary authorization key, not bound to permanent
|
||||
AUTH_KEY_UNREGISTERED The key is not registered in the system
|
||||
AUTH_KEY_UNREGISTERED The key is not registered in the system. Delete your session file and login again
|
||||
SESSION_EXPIRED The authorization has expired
|
||||
SESSION_PASSWORD_NEEDED The two-step verification is enabled and a password is required
|
||||
SESSION_REVOKED The authorization has been invalidated, because of the user terminating all sessions
|
||||
|
|
Reference in New Issue
Block a user