Search code examples
botstelegramtelegram-botphp-telegram-bot

How to detect at telegram bot script's end that preview was ON when a URL in message was sent by a user in a group


I am Developing a telegram bot. Bot is able to receive messages sent by users in a group. Users send URLs in my group and bot script can detect through entity object whether it is a URL or not.

My objective is to detect, when a user send a URL with preview ON.

Is there any possible way to detect it at my bot script?


Solution

  • Unfortunately, bots can't get this type of data :(

    Here have a solution you might interested, if your bot have admin, you can just restrict every users with all permission but can_add_web_page_previews.