Skip to content

Commit c139d78

Browse files
committed
Fix wrong imports in examples
1 parent 1863900 commit c139d78

File tree

11 files changed

+13
-11
lines changed

11 files changed

+13
-11
lines changed

pyrogram/methods/bots/answer_inline_query.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ async def answer_inline_query(
8484
Example:
8585
.. code-block:: python
8686
87-
from pyrogram import InlineQueryResultArticle, InputTextMessageContent
87+
from pyrogram.types import InlineQueryResultArticle, InputTextMessageContent
8888
8989
app.answer_inline_query(
9090
inline_query_id,

pyrogram/methods/chats/restrict_chat_member.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ async def restrict_chat_member(
6060
6161
from time import time
6262
63-
from pyrogram import ChatPermissions
63+
from pyrogram.types import ChatPermissions
6464
6565
# Completely restrict chat member (mute) forever
6666
app.restrict_chat_member(chat_id, user_id, ChatPermissions())

pyrogram/methods/chats/set_chat_permissions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async def set_chat_permissions(
4747
Example:
4848
.. code-block:: python
4949
50-
from pyrogram import ChatPermissions
50+
from pyrogram.types import ChatPermissions
5151
5252
# Completely restrict chat
5353
app.set_chat_permissions(chat_id, ChatPermissions())

pyrogram/methods/contacts/add_contacts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ async def add_contacts(
4040
Example:
4141
.. code-block:: python
4242
43-
from pyrogram import InputPhoneContact
43+
from pyrogram.types import InputPhoneContact
4444
4545
app.add_contacts([
4646
InputPhoneContact("39123456789", "Foo"),

pyrogram/methods/messages/edit_inline_media.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ async def edit_inline_media(
5454
Example:
5555
.. code-block:: python
5656
57-
from pyrogram import InputMediaPhoto, InputMediaVideo, InputMediaAudio
57+
from pyrogram.types import InputMediaPhoto, InputMediaVideo, InputMediaAudio
5858
5959
# Bots only
6060

pyrogram/methods/messages/edit_inline_reply_markup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async def edit_inline_reply_markup(
4444
Example:
4545
.. code-block:: python
4646
47-
from pyrogram import InlineKeyboardMarkup, InlineKeyboardButton
47+
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
4848
4949
# Bots only
5050
app.edit_inline_reply_markup(

pyrogram/methods/messages/edit_message_media.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async def edit_message_media(
6565
Example:
6666
.. code-block:: python
6767
68-
from pyrogram import InputMediaPhoto, InputMediaVideo, InputMediaAudio
68+
from pyrogram.types import InputMediaPhoto, InputMediaVideo, InputMediaAudio
6969
7070
# Replace the current media with a local photo
7171
app.edit_message_media(chat_id, message_id, InputMediaPhoto("new_photo.jpg"))

pyrogram/methods/messages/edit_message_reply_markup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ async def edit_message_reply_markup(
5050
Example:
5151
.. code-block:: python
5252
53-
from pyrogram import InlineKeyboardMarkup, InlineKeyboardButton
53+
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
5454
5555
# Bots only
5656
app.edit_message_reply_markup(

pyrogram/methods/messages/send_message.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ async def send_message(
9898
# For bots only, send messages with keyboards attached
9999
##
100100
101-
from pyrogram import (
101+
from pyrogram.types import (
102102
ReplyKeyboardMarkup, InlineKeyboardMarkup, InlineKeyboardButton)
103103
104104
# Send a normal keyboard

pyrogram/methods/utilities/add_handler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ def add_handler(self, handler: "Handler", group: int = 0):
4444
.. code-block:: python
4545
:emphasize-lines: 8
4646
47-
from pyrogram import Client, MessageHandler
47+
from pyrogram import Client
48+
from pyrogram.handlers import MessageHandler
4849
4950
def dump(client, message):
5051
print(message)

0 commit comments

Comments
 (0)