o
    -˜Žj4	  ã                   @   sB   d dl mZmZ d dlZd dlmZ d dlmZ G dd„ dƒZdS )é    )ÚUnionÚListN)Úraw)Útypesc                   @   sB   e Zd Zdddedeeeef eeeef  f ddfdd„Zd	S )
ÚCreateGroupÚselfzpyrogram.ClientÚtitleÚusersÚreturnz
types.Chatc                 ƒ   sX   �t |tƒs	|g}ˆ  tjjj|‡ fdd„|D ƒI dH d�¡I dH }tj 	ˆ |j
d ¡S )aF  Create a new basic group.

        .. note::

            If you want to create a new supergroup, use :meth:`~pyrogram.Client.create_supergroup` instead.

        .. include:: /_includes/usable-by/users.rst

        Parameters:
            title (``str``):
                The group title.

            users (``int`` | ``str`` | List of ``int`` or ``str``):
                Users to create a chat with.
                You must pass at least one user using their IDs (int), usernames (str) or phone numbers (str).
                Multiple users can be invited by passing a list of IDs, usernames or phone numbers.

        Returns:
            :obj:`~pyrogram.types.Chat`: On success, a chat object is returned.

        Example:
            .. code-block:: python

                await app.create_group("Group Title", user_id)
        c                 “   s   �g | ]
}ˆ   |¡I d H ‘qS )N)Úresolve_peer)Ú.0Úu©r   © ú`/var/www/kodo/Anonymous/send/lib/python3.10/site-packages/pyrogram/methods/chats/create_group.pyÚ
<listcomp>@   s   € z,CreateGroup.create_group.<locals>.<listcomp>N)r   r	   r   )Ú
isinstanceÚlistÚinvoker   Ú	functionsÚmessagesÚ
CreateChatr   ÚChatÚ_parse_chatÚchats)r   r   r	   Úrr   r   r   Úcreate_group   s   €
þ
ÿzCreateGroup.create_groupN)Ú__name__Ú
__module__Ú__qualname__Ústrr   Úintr   r   r   r   r   r   r      s    ÿþýür   )Útypingr   r   Úpyrogramr   r   r   r   r   r   r   Ú<module>   s
   