Ways to register own callback
1:
async def participants_are_updated(group_call, participants):
print(f'Updated participant list: {participants}')
group_call.on_participant_list_updated(participants_are_updated)
2:
@group_call.on_participant_list_updated
async def participants_are_updated(group_call, participants):
print(f'Updated participant list: {participants}')
3:
async def participants_are_updated(group_call, participants):
print(f'Updated participant list: {participants}')
group_call.add_handler(participants_are_updated, GroupCallAction.PARTICIPANT_LIST_UPDATED)
Output
Telethon:
Updated participant list: [<GroupCallParticipantWrapper>({'peer': <telethon.tl.types.PeerChannel object at 0x10eb4a5b0>, 'date': datetime.datetime(2021, 8, 22, 15, 35, 51, tzinfo=datetime.timezone.utc), 'source': 1382476690, 'muted': True, 'left': False, 'can_self_unmute': True, 'just_joined': False, 'versioned': False, 'min': False, 'muted_by_you': False, 'volume_by_admin': True, 'is_self': False, 'video_joined': False, 'active_date': None, 'volume': None, 'about': '🧑🏻\u200d💻DEV. More info inside...', 'raise_hand_rating': None})]
Pyrogram:
Updated participant list: [<GroupCallParticipantWrapper>({'peer': pyrogram.raw.types.PeerChannel(channel_id=1359572958), 'date': 1629646551, 'source': 1382476690, 'muted': True, 'left': False, 'can_self_unmute': True, 'just_joined': False, 'versioned': False, 'min': False, 'muted_by_you': False, 'volume_by_admin': True, 'is_self': False, 'video_joined': None, 'active_date': None, 'volume': None, 'about': '🧑🏻\u200d💻DEV. More info inside...', 'raise_hand_rating': None})]