amsync/obj.py
async def communities(
        need_print:   bool = False,
        ignore_ascii: bool = False
    ) -> dict[str, str]:
        """
        Returns all the communities you are in

        ### need_print
        Print the chats in a readable form

        ### ignore_ascii
        Removes special characters, which can disrupt the need_print
        """

        res = await _req('get', f'g/s/community/joined?v=1&start=0&size=100')
        coms = {
            i['name']
            if not ignore_ascii
            else fix_ascii(i['name']): str(i['ndcId'])
            for i in res.json['communityList']
        }

        if need_print:
            max_name = len(max(coms.keys(), key=len))
            for i, e in coms.items():
                a = max_name - len(i)
                print(f'{i} {" "*a} -> {e}')

        return coms

        Returns all the communities you are in

        ### need_print
        Print the chats in a readable form

        ### ignore_ascii
        Removes special characters, which can disrupt the need_print
        
Returns all the communities you are in
need_print
Print the chats in a readable form

ignore_ascii
Removes special characters, which can disrupt the need_print
Returns all the communities you are in need_print Print the chats in a readable form ignore_ascii Removes special characters which can disrupt the need_print
async def communities(
        need_print:   bool = False,
        ignore_ascii: bool = False
    ) -> dict[str, str]:
        res = await _req('get', f'g/s/community/joined?v=1&start=0&size=100')
        coms = {
            i['name']
            if not ignore_ascii
            else fix_ascii(i['name']): str(i['ndcId'])
            for i in res.json['communityList']
        }
        if need_print:
            max_name = len(max(coms.keys(), key=len))
            for i, e in coms.items():
                a = max_name - len(i)
                print(f'{i} {" "*a} -> {e}')
        return coms
async def communities ( need_print : bool = False , ignore_ascii : bool = False ) -> dict [ str , str ] : res = await _req ( 'get' , f'g/s/community/joined?v=1&start=0&size=100' ) coms = { i [ 'name' ] if not ignore_ascii else fix_ascii ( i [ 'name' ] ) : str ( i [ 'ndcId' ] ) for i in res . json [ 'communityList' ] } if need_print : max_name = len ( max ( coms . keys ( ) , key = len ) ) for i , e in coms . items ( ) : a = max_name - len ( i ) print ( f'{i} {" "*a} -> {e}' ) return coms
Returns all the communities you are in
 need_print
Print the chats in a readable form
Returns all the communities you are in need_print Print the chats in a readable form
"""
        Returns all the communities you are in

        ### need_print
        Print the chats in a readable form

        ### ignore_ascii
        Removes special characters, which can disrupt the need_print
        """
need_print
bool
ignore_ascii
bool