
    N[i                     H    d dl mZmZ d dlZd dlmZ d dlmZ  G d d      Zy)    )UnionListN)raw)typesc                   H    e Zd Zdddedeeeef   eeeef      f   ddfdZy)	CreateGroupselfzpyrogram.Clienttitleusersreturnz
types.Chatc                 j  K   t        |t              s|g}| j                  t        j                  j
                  j                  ||D cg c]  }| j                  |       d{    c}             d{   }t        j                  j                  | |j                  d         S 7 Gc c}w 7 8w)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)
        N)r
   r   r   )
isinstancelistinvoker   	functionsmessages
CreateChatresolve_peerr   Chat_parse_chatchats)r	   r
   r   urs        V/var/www/files/kim/lib/python3.12/site-packages/pyrogram/methods/chats/create_group.pycreate_groupzCreateGroup.create_group   s     < %&GE++MM""--;@AaT..q111A . 
 
 zz%%dAGGAJ77	 2A
s6   AB3	B,"B*#B,)B38B191B3*B,,B3N)__name__
__module____qualname__strr   intr   r        r   r   r      sJ    (8(8(8 U38_d5c?&;;<(8 
	(8r"   r   )typingr   r   pyrogramr   r   r   r!   r"   r   <module>r%      s   &    )8 )8r"   