J
J
JustTim2021-10-16 23:33:04
Python
JustTim, 2021-10-16 23:33:04

The bot does not see the file in the telegram channel, what should I do?

I am writing a bot that processes messages in a channel.
The bot perceives text messages with the help @bot.channel_post_handler(), but if I send a file, it does not see it and does not react in any way. Can this be fixed somehow?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-10-17
@SoreMix

Pass the content_type you need to the decorator

@bot.channel_post_handler(content_types=['document'])

https://github.com/eternnoir/pyTelegramBotAPI#types

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question