get_chat_event_log()¶
- Client.get_chat_event_log()¶
Get the actions taken by chat members and administrators in the last 48h.
Only available for supergroups and channels. Requires administrator rights. Results are returned in reverse chronological order (i.e., newest first).
Usable by Users Bots
- Parameters:¶
chat_id (
int
|str
) – Unique identifier (int) or username (str) of the target chat. You can also use chat public link in form of t.me/<username> (str).query (
str
, optional) – Search query to filter events based on text. By default, an empty query is applied and all events will be returned.offset_id (
int
, optional) – Offset event identifier from which to start returning results. By default, no offset is applied and events will be returned starting from the latest.limit (
int
, optional) – Maximum amount of events to be returned. By default, all events will be returned.filters (
ChatEventFilter
, optional) – The types of events to return. By default, all types will be returned.user_ids (List of
int
|str
, optional) – User identifiers (int) or usernames (str) by which to filter events. By default, events relating to all users will be returned.
- Yields:¶
ChatEvent
objects.
Example
async for event in app.get_chat_event_log(chat_id): print(event)