channels.getAdminLog
Get the admin log of a channel/supergroup
func (c *Client) ChannelsGetAdminLog(ctx context.Context, request *ChannelsGetAdminLogRequest) (*ChannelsAdminLogResults, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.ChannelsGetAdminLog(ctx, &tg.ChannelsGetAdminLogRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // *ChannelsAdminLogResults
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Channel | InputChannelClass | yes | Channel |
Q | string | yes | Search query, can be empty |
EventsFilter | ChannelAdminLogEventsFilter | — | Event filter |
Admins | []InputUserClass | — | Only show events from these admins |
MaxID | int64 | yes | Maximum ID of message to return (see pagination) |
MinID | int64 | yes | Minimum ID of message to return (see pagination) |
Limit | int | yes | Maximum number of results to return, see pagination |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
| 406 | CHANNEL_PRIVATE | You haven't joined this channel/supergroup. |
| 403 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
| 403 | CHAT_WRITE_FORBIDDEN | You can't write in this chat. |
| 400 | MSG_ID_INVALID | Invalid message ID provided. |
References
- Official documentation
- Generated Go reference
- TL definition:
channels.getAdminLog#33ddf480