async def pin(self, *, reason: Optional[str]=None) -> None:
    '|coro|\n\n        Pins the message.\n\n        You must have the :attr:`~Permissions.manage_messages` permission to do\n        this in a non-private channel context.\n\n        Parameters\n        -----------\n        reason: Optional[:class:`str`]\n            The reason for pinning the message. Shows up on the audit log.\n\n            .. versionadded:: 1.4\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to pin the message.\n        NotFound\n            The message or channel was not found or deleted.\n        HTTPException\n            Pinning the message failed, probably due to the channel\n            having more than 50 pinned messages.\n        '
    (await self._state.http.pin_message(self.channel.id, self.id, reason=reason))
    self.pinned = True
|coro|

Pins the message.

You must have the :attr:`~Permissions.manage_messages` permission to do
this in a non-private channel context.

Parameters
-----------
reason: Optional[:class:`str`]
    The reason for pinning the message. Shows up on the audit log.

    .. versionadded:: 1.4

Raises
-------
Forbidden
    You do not have permissions to pin the message.
NotFound
    The message or channel was not found or deleted.
HTTPException
    Pinning the message failed, probably due to the channel
    having more than 50 pinned messages.
async def pin(self, *, reason: Optional[str]=None) -> None:
    '|coro|\n\n        Pins the message.\n\n        You must have the :attr:`~Permissions.manage_messages` permission to do\n        this in a non-private channel context.\n\n        Parameters\n        -----------\n        reason: Optional[:class:`str`]\n            The reason for pinning the message. Shows up on the audit log.\n\n            .. versionadded:: 1.4\n\n        Raises\n        -------\n        Forbidden\n            You do not have permissions to pin the message.\n        NotFound\n            The message or channel was not found or deleted.\n        HTTPException\n            Pinning the message failed, probably due to the channel\n            having more than 50 pinned messages.\n        '
    (await self._state.http.pin_message(self.channel.id, self.id, reason=reason))
    self.pinned = True