mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-31 06:16:06 +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, ...
|
||||
|
||||
|
Reference in New Issue
Block a user