This repository has been archived on 2024-08-21. You can view files and clone it, but cannot push or open issues or pull requests.
EmojiCaptchaBot/plugins/handlers/bot_join.py

15 lines
409 B
Python
Raw Permalink Normal View History

2023-08-11 16:04:21 +03:00
import logging
from pyrogram import filters
from pyrogram.types import Message
from classes.pyroclient import PyroClient
logger = logging.getLogger(__name__)
2023-08-11 22:33:08 +03:00
@PyroClient.on_message(filters.new_chat_members & filters.group & filters.me) # type: ignore
2023-08-11 16:04:21 +03:00
async def handler_bot_join(app: PyroClient, message: Message):
logger.info("Bot has joined the group %s")
2023-08-17 17:37:42 +03:00
await app.find_group(message.chat.id)