ForumTopic

class pyrogram.raw.types.ForumTopic

Represents a forum topic.

Constructor of ForumTopic.

Details:
  • Layer: 227

  • ID: FCDAD815

Parameters:
  • id (int 32-bit) – Topic ID

  • date (int 32-bit) – Topic creation date

  • peer (Peer)

  • title (str) – Topic title

  • icon_color (int 32-bit) – If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F.

  • top_message (int 32-bit) – ID of the last message that was sent to this topic

  • read_inbox_max_id (int 32-bit) – Position up to which all incoming messages are read.

  • read_outbox_max_id (int 32-bit) – Position up to which all outgoing messages are read.

  • unread_count (int 32-bit) – Number of unread messages

  • unread_mentions_count (int 32-bit) – Number of unread mentions

  • unread_reactions_count (int 32-bit) – Number of unread reactions to messages you sent

  • unread_poll_votes_count (int 32-bit) – N/A

  • from_id (Peer) – ID of the peer that created the topic

  • notify_settings (PeerNotifySettings) – Notification settings

  • my (bool, optional) – Whether the topic was created by the current user

  • closed (bool, optional) – Whether the topic is closed (no messages can be sent to it)

  • pinned (bool, optional) – Whether the topic is pinned

  • short (bool, optional) – Whether this constructor is a reduced version of the full topic information. If set, only the my, closed, id, date, title, icon_color, icon_emoji_id and from_id parameters will contain valid information. Reduced info is usually only returned in topic-related admin log events » and in the messages.channelMessages constructor: if needed, full information can be fetched using channels.getForumTopicsByID.

  • hidden (bool, optional) – Whether the topic is hidden (only valid for the “General” topic, id=1)

  • title_missing (bool, optional)

  • icon_emoji_id (int 64-bit, optional) – ID of the custom emoji used as topic icon.

  • draft (DraftMessage, optional) – Message draft

TL Schema

forumTopic#fcdad815
flags:#
my:flags.1?true
closed:flags.2?true
pinned:flags.3?true
short:flags.5?true
hidden:flags.6?true
title_missing:flags.7?true
id:int
date:int
peer:Peer
title:string
icon_color:int
icon_emoji_id:flags.0?long
top_message:int
read_inbox_max_id:int
read_outbox_max_id:int
unread_count:int
unread_mentions_count:int
unread_reactions_count:int
unread_poll_votes_count:int
from_id:Peer
notify_settings:PeerNotifySettings
draft:flags.4?DraftMessage

= ForumTopic

Parameter Tree

ForumTopic
├── my → true (optional)
├── closed → true (optional)
├── pinned → true (optional)
├── short → true (optional)
├── hidden → true (optional)
├── title_missing → true (optional)
├── id → int
├── date → int
├── peer → Peer
│ ├── PeerUser
│ │ └── user_id → long
│ ├── PeerChat
│ │ └── chat_id → long
│ └── PeerChannel
│ └── channel_id → long
├── title → string
├── icon_color → int
├── icon_emoji_id → long (optional)
├── top_message → int
├── read_inbox_max_id → int
├── read_outbox_max_id → int
├── unread_count → int
├── unread_mentions_count → int
├── unread_reactions_count → int
├── unread_poll_votes_count → int
├── from_id → Peer
│ ├── PeerUser
│ │ └── user_id → long
│ ├── PeerChat
│ │ └── chat_id → long
│ └── PeerChannel
│ └── channel_id → long
├── notify_settings → PeerNotifySettings
│ └── PeerNotifySettings
│ ├── show_previews → Bool (optional)
│ ├── silent → Bool (optional)
│ ├── mute_until → int (optional)
│ ├── ios_sound → NotificationSound (optional)
│ │ ├── NotificationSoundDefault
│ │ ├── NotificationSoundNone
│ │ ├── NotificationSoundLocal
│ │ │ ├── title → string
│ │ │ └── data → string
│ │ └── NotificationSoundRingtone
│ │ └── id → long
│ ├── android_sound → NotificationSound (optional)
│ │ ├── NotificationSoundDefault
│ │ ├── NotificationSoundNone
│ │ ├── NotificationSoundLocal
│ │ │ ├── title → string
│ │ │ └── data → string
│ │ └── NotificationSoundRingtone
│ │ └── id → long
│ ├── other_sound → NotificationSound (optional)
│ │ ├── NotificationSoundDefault
│ │ ├── NotificationSoundNone
│ │ ├── NotificationSoundLocal
│ │ │ ├── title → string
│ │ │ └── data → string
│ │ └── NotificationSoundRingtone
│ │ └── id → long
│ ├── stories_muted → Bool (optional)
│ ├── stories_hide_sender → Bool (optional)
│ ├── stories_ios_sound → NotificationSound (optional)
│ │ ├── NotificationSoundDefault
│ │ ├── NotificationSoundNone
│ │ ├── NotificationSoundLocal
│ │ │ ├── title → string
│ │ │ └── data → string
│ │ └── NotificationSoundRingtone
│ │ └── id → long
│ ├── stories_android_sound → NotificationSound (optional)
│ │ ├── NotificationSoundDefault
│ │ ├── NotificationSoundNone
│ │ ├── NotificationSoundLocal
│ │ │ ├── title → string
│ │ │ └── data → string
│ │ └── NotificationSoundRingtone
│ │ └── id → long
│ └── stories_other_sound → NotificationSound (optional)
│ ├── NotificationSoundNone
│ │ ├── title → string
│ │ └── data → string
│ └── id → long
└── draft → DraftMessage (optional)
│ └── date → int (optional)
└── DraftMessage
├── no_webpage → true (optional)
├── invert_media → true (optional)
├── reply_to → InputReplyTo (optional)
│ ├── InputReplyToMessage
│ │ ├── reply_to_msg_id → int
│ │ ├── top_msg_id → int (optional)
│ │ ├── reply_to_peer_id → InputPeer (optional)
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── quote_text → string (optional)
│ │ ├── quote_entities → Vector < MessageEntity > (optional)
│ │ │ ├── MessageEntityUnknown
│ │ │ ├── MessageEntityMention
│ │ │ ├── MessageEntityHashtag
│ │ │ ├── MessageEntityBotCommand
│ │ │ ├── MessageEntityUrl
│ │ │ ├── MessageEntityEmail
│ │ │ ├── MessageEntityBold
│ │ │ ├── MessageEntityItalic
│ │ │ ├── MessageEntityCode
│ │ │ ├── MessageEntityPre
│ │ │ ├── MessageEntityTextUrl
│ │ │ ├── MessageEntityMentionName
│ │ │ ├── InputMessageEntityMentionName
│ │ │ ├── MessageEntityPhone
│ │ │ ├── MessageEntityCashtag
│ │ │ ├── MessageEntityUnderline
│ │ │ ├── MessageEntityStrike
│ │ │ ├── MessageEntityBankCard
│ │ │ ├── MessageEntitySpoiler
│ │ │ ├── MessageEntityCustomEmoji
│ │ │ ├── MessageEntityBlockquote
│ │ │ ├── MessageEntityFormattedDate
│ │ │ ├── MessageEntityDiffInsert
│ │ │ ├── MessageEntityDiffReplace
│ │ │ └── MessageEntityDiffDelete
│ │ ├── quote_offset → int (optional)
│ │ ├── monoforum_peer_id → InputPeer (optional)
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ ├── todo_item_id → int (optional)
│ │ └── poll_option → bytes (optional)
│ ├── InputReplyToStory
│ │ ├── peer → InputPeer
│ │ │ ├── InputPeerEmpty
│ │ │ ├── InputPeerSelf
│ │ │ ├── InputPeerChat
│ │ │ ├── InputPeerUser
│ │ │ ├── InputPeerChannel
│ │ │ ├── InputPeerUserFromMessage
│ │ │ └── InputPeerChannelFromMessage
│ │ └── story_id → int
│ └── InputReplyToMonoForum
│ └── monoforum_peer_id → InputPeer
│ ├── InputPeerEmpty
│ ├── InputPeerSelf
│ ├── InputPeerChat
│ ├── InputPeerUser
│ ├── InputPeerChannel
├── message → string
├── entities → Vector < MessageEntity > (optional)
│ ├── MessageEntityUnknown
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityMention
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityHashtag
│ │ ├── offset → int
│ │ └── length → int
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityUrl
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityEmail
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityBold
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityItalic
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityCode
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityPre
│ │ ├── offset → int
│ │ ├── length → int
│ │ └── language → string
│ ├── MessageEntityTextUrl
│ │ ├── offset → int
│ │ ├── length → int
│ │ └── url → string
│ │ ├── offset → int
│ │ ├── length → int
│ │ └── user_id → long
│ │ ├── offset → int
│ │ ├── length → int
│ │ └── user_id → InputUser
│ │ ├── InputUserEmpty
│ │ ├── InputUserSelf
│ │ ├── InputUser
│ │ └── InputUserFromMessage
│ ├── MessageEntityPhone
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityCashtag
│ │ ├── offset → int
│ │ └── length → int
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityStrike
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntityBankCard
│ │ ├── offset → int
│ │ └── length → int
│ ├── MessageEntitySpoiler
│ │ ├── offset → int
│ │ └── length → int
│ │ ├── offset → int
│ │ ├── length → int
│ │ └── document_id → long
│ │ ├── collapsed → true (optional)
│ │ ├── offset → int
│ │ └── length → int
│ │ ├── relative → true (optional)
│ │ ├── short_time → true (optional)
│ │ ├── long_time → true (optional)
│ │ ├── short_date → true (optional)
│ │ ├── long_date → true (optional)
│ │ ├── day_of_week → true (optional)
│ │ ├── offset → int
│ │ ├── length → int
│ │ └── date → int
│ │ ├── offset → int
│ │ └── length → int
│ │ ├── offset → int
│ │ ├── length → int
│ │ └── old_text → string
│ ├── offset → int
│ └── length → int
├── media → InputMedia (optional)
│ ├── InputMediaEmpty
│ ├── InputMediaPhoto
│ ├── InputMediaGeoPoint
│ ├── InputMediaContact
│ ├── InputMediaDocument
│ ├── InputMediaVenue
│ ├── InputMediaGame
│ ├── InputMediaInvoice
│ ├── InputMediaGeoLive
│ ├── InputMediaPoll
│ ├── InputMediaDice
│ ├── InputMediaStory
│ ├── InputMediaWebPage
│ ├── InputMediaPaidMedia
│ ├── InputMediaTodo
│ └── InputMediaStakeDice
├── date → int
├── effect → long (optional)
├── suggested_post → SuggestedPost (optional)
│ └── SuggestedPost
│ ├── accepted → true (optional)
│ ├── rejected → true (optional)
│ ├── price → StarsAmount (optional)
│ │ ├── StarsAmount
│ │ └── StarsTonAmount
│ └── schedule_date → int (optional)
└── rich_message → RichMessage (optional)
└── RichMessage
├── rtl → true (optional)
├── part → true (optional)
├── blocks → Vector < PageBlock >
│ ├── PageBlockUnsupported
│ ├── PageBlockTitle
│ ├── PageBlockSubtitle
│ ├── PageBlockAuthorDate
│ ├── PageBlockHeader
│ ├── PageBlockSubheader
│ ├── PageBlockParagraph
│ ├── PageBlockPreformatted
│ ├── PageBlockFooter
│ ├── PageBlockDivider
│ ├── PageBlockAnchor
│ ├── PageBlockList
│ ├── PageBlockBlockquote
│ ├── PageBlockPullquote
│ ├── PageBlockPhoto
│ ├── PageBlockVideo
│ ├── PageBlockCover
│ ├── PageBlockEmbed
│ ├── PageBlockEmbedPost
│ ├── PageBlockCollage
│ ├── PageBlockSlideshow
│ ├── PageBlockChannel
│ ├── PageBlockAudio
│ ├── PageBlockKicker
│ ├── PageBlockTable
│ ├── PageBlockOrderedList
│ ├── PageBlockDetails
│ ├── PageBlockMap
│ ├── PageBlockHeading1
│ ├── PageBlockHeading2
│ ├── PageBlockHeading3
│ ├── PageBlockHeading4
│ ├── PageBlockHeading5
│ ├── PageBlockHeading6
│ ├── PageBlockMath
│ ├── PageBlockThinking
│ ├── InputPageBlockMap
├── photos → Vector < Photo >
│ ├── PhotoEmpty
│ └── Photo
└── documents → Vector < Document >
├── DocumentEmpty
└── Document

Example

ForumTopic(
    id=0,
    date=0,
    peer=PeerUser(user_id=0),
    title="text",
    icon_color=0,
    top_message=0,
    read_inbox_max_id=0,
    read_outbox_max_id=0,
    unread_count=0,
    unread_mentions_count=0,
    unread_reactions_count=0,
    unread_poll_votes_count=0,
    from_id=PeerUser(user_id=0),
    notify_settings=PeerNotifySettings(),
)