Skip to main content

channels.toggleJoinToSend

Set whether all users should join a discussion group in order to comment on a post »

func (c *Client) ChannelsToggleJoinToSend(ctx context.Context, request *ChannelsToggleJoinToSendRequest) (UpdatesClass, error)

Calling this method

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

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

Parameters

NameTypeRequiredDescription
ChannelInputChannelClassyesDiscussion group
EnabledboolyesToggle

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400CHANNEL_INVALIDThe provided channel is invalid.
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400CHAT_ID_INVALIDThe provided chat id is invalid.
400CHAT_NOT_MODIFIEDNo changes were made to chat information because the new information you passed is identical to the current information.

References