Hide navigation sidebar
Hide table of contents sidebar
PTB has undergone significant changes in v20. Please read the documentation carefully and also check out the transition guide in the wiki.
Back to top
Toggle table of contents sidebar

# MessageOriginChannel

class telegram.MessageOriginChannel(date, chat, message_id, author_signature=None, *, api_kwargs=None)

  Bases: `telegram.MessageOrigin`

  The message was originally sent to a channel chat.

  Available In

  - `telegram.ExternalReplyInfo.origin`

  - `telegram.Message.forward_origin`

  New in version 20.8.

  Parameters:

    - date (`datetime.datetime`) – Date the message was sent originally. The default timezone of the bot is used for localization, which is UTC unless `telegram.ext.Defaults.tzinfo` is used.

    - chat (`telegram.Chat`) – Channel chat to which the message was originally sent.

    - message_id (`int`) – Unique message identifier inside the chat.

    - author_signature (`str`, optional) – Signature of the original post author.

  type

    Type of the message origin. Always `'channel'`.

    Type:

      `str`

  date

    Date the message was sent originally. The default timezone of the bot is used for localization, which is UTC unless `telegram.ext.Defaults.tzinfo` is used.

    Type:

      `datetime.datetime`

  chat

    Channel chat to which the message was originally sent.

    Type:

      `telegram.Chat`

  message_id

    Unique message identifier inside the chat.

    Type:

      `int`

  author_signature

    Optional. Signature of the original post author.

    Type:

      `str`