channels.GetAdminLog

class pyrogram.raw.functions.channels.GetAdminLog

Get the admin log of a channel/supergroup

Details:
  • Layer: 227

  • ID: 33DDF480

Parameters:
  • channel (InputChannel) – Channel

  • q (str) – Search query, can be empty

  • max_id (int 64-bit) – Maximum ID of message to return (see pagination)

  • min_id (int 64-bit) – Minimum ID of message to return (see pagination)

  • limit (int 32-bit) – Maximum number of results to return, see pagination

  • events_filter (ChannelAdminLogEventsFilter, optional) – Event filter

  • admins (List of InputUser, optional) – Only show events from these admins

Returns:

channels.AdminLogResults

TL Schema

channels.getAdminLog#33ddf480
flags:#
channel:InputChannel
q:string
events_filter:flags.0?ChannelAdminLogEventsFilter
admins:flags.1?Vector<InputUser>
max_id:long
min_id:long
limit:int

= channels.AdminLogResults

Parameter Tree

GetAdminLog
├── channel → InputChannel
│ ├── InputChannelEmpty
│ ├── InputChannel
│ │ ├── channel_id → long
│ │ └── access_hash → long
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── channel_id → long
├── q → string
├── events_filter → ChannelAdminLogEventsFilter (optional)
│ ├── join → true (optional)
│ ├── leave → true (optional)
│ ├── invite → true (optional)
│ ├── ban → true (optional)
│ ├── unban → true (optional)
│ ├── kick → true (optional)
│ ├── unkick → true (optional)
│ ├── promote → true (optional)
│ ├── demote → true (optional)
│ ├── info → true (optional)
│ ├── settings → true (optional)
│ ├── pinned → true (optional)
│ ├── edit → true (optional)
│ ├── delete → true (optional)
│ ├── group_call → true (optional)
│ ├── invites → true (optional)
│ ├── send → true (optional)
│ ├── forums → true (optional)
│ ├── sub_extend → true (optional)
│ └── edit_rank → true (optional)
├── admins → Vector < InputUser > (optional)
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_id → long
│ │ └── access_hash → long
│ └── InputUserFromMessage
│ ├── peer → InputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_id → int
│ └── user_id → long
├── max_id → long
├── min_id → long
└── limit → int

Example

await app.invoke(
    GetAdminLog(
        channel=await app.resolve_channel(chat_id),
        q="text",
        events_filter=ChannelAdminLogEventsFilter(
            join=None,
            leave=None,
            invite=None,
            ban=None,
            unban=None,
            kick=None,
            unkick=None,
            promote=None,
            demote=None,
            info=None,
            settings=None,
            pinned=None,
            edit=None,
            delete=None,
            group_call=None,
            invites=None,
            send=None,
            forums=None,
            sub_extend=None,
            edit_rank=None
        ),
        admins=[
                await app.resolve_user(chat_id)
            ],
        max_id=0,
        min_id=0,
        limit=0,
    )
)