Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyrogram/methods/chats/pin_chat_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.

from typing import Union
from typing import Union, Optional

import pyrogram
from pyrogram import raw, types, utils
Expand All @@ -29,7 +29,7 @@ async def pin_chat_message(
message_id: int,
disable_notification: bool = False,
both_sides: bool = False,
) -> "types.Message":
) -> Optional["types.Message"]:
"""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
the supergroup or "can_edit_messages" admin right in the channel.
Expand Down
2 changes: 1 addition & 1 deletion pyrogram/types/messages_and_media/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -6030,7 +6030,7 @@ async def vote(
options=option
)

async def pin(self, disable_notification: bool = False, both_sides: bool = False) -> "types.Message":
async def pin(self, disable_notification: bool = False, both_sides: bool = False) -> Optional["types.Message"]:
"""Bound method *pin* of :obj:`~pyrogram.types.Message`.

Use as a shortcut for:
Expand Down
Loading