Skip to main content

messages.hideAllChatJoinRequests

Dismiss or approve all join requests related to a specific chat or channel.

func (c *Client) MessagesHideAllChatJoinRequests(ctx context.Context, request *MessagesHideAllChatJoinRequestsRequest) (UpdatesClass, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.MessagesHideAllChatJoinRequests(ctx, &tg.MessagesHideAllChatJoinRequestsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // UpdatesClass
return nil
})

Parameters

NameTypeRequiredDescription
ApprovedboolWhether to dismiss or approve all chat join requests »
PeerInputPeerClassyesThe chat or channel
LinkstringOnly dismiss or approve join requests » initiated using this invite link

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400CHANNELS_TOO_MUCHYou have joined too many channels/supergroups.
400CHANNEL_INVALIDThe provided channel is invalid.
400CHANNEL_PRIVATEYou haven't joined this channel/supergroup.
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
403CHAT_WRITE_FORBIDDENYou can't write in this chat.
400HIDE_REQUESTER_MISSINGThe join request was missing or was already handled.
400INVITE_HASH_EXPIREDThe invite link has expired.
400PEER_ID_INVALIDThe provided peer id is invalid.
400USER_CHANNELS_TOO_MUCHOne of the users you tried to add is already in too many channels/supergroups.

References