RuuZak1
RuuZak1

Reputation: 1

Telegram Channel Boost information in Telegrsm API

Does the Telegram API have the ability to display the number of channel boosts and the percentage of premium subscribers in the channel where a Human or Bot is the admin? I need solution on python

When I searched about this on the Internet, I found this link https://core.telegram.org/api/boost but could not understand how it works and how to get

Upvotes: 0

Views: 663

Answers (1)

0stone0
0stone0

Reputation: 44029

  1. You're looking at the wrong documentation.
    You link to the Core document, but since you're talking about a Bot, focus on the Bot Documentation.

  2. Looking at the recent bot api changes (API 7.1) you'll see :

    Bot API 7.1
    • Added support for the administrator rights can_post_stories, can_edit_stories, can_delete_stories in supergroups.
    • Added the class ChatBoostAdded and the field boost_added to the class Message for service messages about a user boosting a chat.
    • Added the field sender_boost_count to the class Message.
    • Added the field reply_to_story to the class Message.
    • Added the fields chat and id to the class Story.
    • Added the field unrestrict_boost_count to the class Chat.
    • Added the field custom_emoji_sticker_set_name to the class Chat.

    So you will be able to keep track of the boost provided with the above mentioned fields, but currently there is no way to retrieve the 'percentage of premium subscribers' with a single call.

  3. There is a getUserChatBoosts method that gives

    Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object.

    But since that is on the user-level , it still requires some additional actions to count them all.

Upvotes: 0

Related Questions