How to get a telegram bot work in a channel?
Question:
I can’t get it to work through properties like command or just content_types. No errors show up.
@dp.message_handler(commands=["start"])
async def start(msg:Message):
if msg.chat.type == ChatType.CHANNEL:
await msg.answer(msg)
I made so bot sent a message to the channel. Still nothing.
P.S It works with getUpdates
Answers:
In the Dispatcher class there is a decorator called "channel_post_handler".
I can’t get it to work through properties like command or just content_types. No errors show up.
@dp.message_handler(commands=["start"])
async def start(msg:Message):
if msg.chat.type == ChatType.CHANNEL:
await msg.answer(msg)
I made so bot sent a message to the channel. Still nothing.
P.S It works with getUpdates
In the Dispatcher class there is a decorator called "channel_post_handler".