Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force subscribe to channel to use the bot [aiogram]

I have a simple chat-bot writed with aiogram for receiving messages from users and answering to them. I want to make sure that user is subscribed to a particular channel before he can use my bot. How can I implement that?

like image 416
Kevin Avatar asked Dec 03 '25 04:12

Kevin


1 Answers

Use getChatMember method and then check status field of the ChatMember

like image 69
Oleg Avatar answered Dec 05 '25 20:12

Oleg