async def send_activities(self, context: TurnContext, activities: List[Activity]):
        """
        Logs a series of activities to the console.
        :param context:
        :param activities:
        :return:
        """
        if context is None:
            raise TypeError('ConsoleAdapter.send_activities(): `context` argument cannot be None.')
        if type(activities) != list:
            raise TypeError('ConsoleAdapter.send_activities(): `activities` argument must be a list.')
        if len(activities) == 0:
            raise ValueError('ConsoleAdapter.send_activities(): `activities` argument cannot have a length of 0.')

        async def next_activity(i: int):
            responses = []

            if i < len(activities):
                responses.append(ResourceResponse())
                a = activities[i]

                if a.type == 'delay':
                    await asyncio.sleep(a.delay)
                    await next_activity(i + 1)
                elif a.type == ActivityTypes.message:
                    if a.attachments is not None and len(a.attachments) > 0:
                        append = '(1 attachment)' if len(a.attachments) == 1 else f'({len(a.attachments)} attachments)'
                        print(f'{a.text} {append}')
                    else:
                        print(a.text)
                    await next_activity(i + 1)
                else:
                    print(f'[{a.type}]')
                    await next_activity(i + 1)
            else:
                return responses

        await next_activity(0)
async def send_activities(self, context: TurnContext, activities: List[Activity]):
        """
        Logs a series of activities to the console.
        :param context:
        :param activities:
        :return:
        """
        if context is None:
            raise TypeError('ConsoleAdapter.send_activities(): `context` argument cannot be None.')
        if type(activities) != list:
            raise TypeError('ConsoleAdapter.send_activities(): `activities` argument must be a list.')
        if len(activities) == 0:
            raise ValueError('ConsoleAdapter.send_activities(): `activities` argument cannot have a length of 0.')

        async def next_activity(i: int):
            responses = []

            if i < len(activities):
                responses.append(ResourceResponse())
                a = activities[i]

                if a.type == 'delay':
                    await asyncio.sleep(a.delay)
                    await next_activity(i + 1)
                elif a.type == ActivityTypes.message:
                    if a.attachments is not None and len(a.attachments) > 0:
                        append = '(1 attachment)' if len(a.attachments) == 1 else f'({len(a.attachments)} attachments)'
                        print(f'{a.text} {append}')
                    else:
                        print(a.text)
                    await next_activity(i + 1)
                else:
                    print(f'[{a.type}]')
                    await next_activity(i + 1)
            else:
                return responses

        await next_activity(0)
async def send_activities ( self , context : TurnContext , activities : List [ Activity ] ) : if context is None : raise TypeError ( 'ConsoleAdapter.send_activities(): `context` argument cannot be None.' ) if type ( activities ) != list : raise TypeError ( 'ConsoleAdapter.send_activities(): `activities` argument must be a list.' ) if len ( activities ) == 0 : raise ValueError ( 'ConsoleAdapter.send_activities(): `activities` argument cannot have a length of 0.' ) async def next_activity ( i : int ) : responses = [ ] if i < len ( activities ) : responses . append ( ResourceResponse ( ) ) a = activities [ i ] if a . type == 'delay' : await asyncio . sleep ( a . delay ) await next_activity ( i + 1 ) elif a . type == ActivityTypes . message : if a . attachments is not None and len ( a . attachments ) > 0 : append = '(1 attachment)' if len ( a . attachments ) == 1 else f'({len(a.attachments)} attachments)' print ( f'{a.text} {append}' ) else : print ( a . text ) await next_activity ( i + 1 ) else : print ( f'[{a.type}]' ) await next_activity ( i + 1 ) else : return responses await next_activity ( 0 )
Logs a series of activities to the console.
        :param context:
        :param activities:
        :return:
Logs a series of activities to the console . : param context : : param activities : : return :