Last active
June 29, 2023 10:45
-
-
Save AlgorithmAlchemy/88d57ad6869141dda317701753ddc7af to your computer and use it in GitHub Desktop.
Aiogram 2.x chat member left | chat_member_on | ChatMemberUpdated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from aiogram import Bot, Dispatcher, executor, types | |
from aiogram.types import AllowedUpdates | |
import config | |
bot = Bot(token=config.API_TOKEN) | |
dp = Dispatcher(bot) | |
@dp.message_handler(commands=['start'], chat_type='private') | |
async def start_cmd_message(message: types.Message): | |
print(666) | |
@dp.chat_member_handler() | |
async def chat_member(member: types.ChatMemberUpdated): | |
print(member) | |
if __name__ == '__main__': | |
executor.start_polling(dp, allowed_updates=AllowedUpdates.all()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment