Skip to main content

messages.setChatAvailableReactions

Change the set of message reactions » that can be used in a certain group, supergroup or channel

func (c *Client) MessagesSetChatAvailableReactions(ctx context.Context, request *MessagesSetChatAvailableReactionsRequest) (UpdatesClass, error)

Calling this method

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

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

Parameters

NameTypeRequiredDescription
PeerInputPeerClassyesGroup where to apply changes
AvailableReactionsChatReactionsClassyesAllowed reaction emojis
ReactionsLimitintThis flag may be used to impose a custom limit of unique reactions (i.e. a customizable version of appConfig.reactions_uniq_max); this field and the other info set by the method will then be available to users in channelFull and chatFull. If this flag is not set, the previously configured reactions_limit will not be altered.
PaidEnabledboolIf this flag is set and a Bool is passed, the method will enable or disable paid message reactions ». If this flag is not set, the previously stored setting will not be changed.

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400CHAT_ADMIN_REQUIREDYou must be an admin in this chat to do this.
400CHAT_NOT_MODIFIEDNo changes were made to chat information because the new information you passed is identical to the current information.
400DOCUMENT_INVALIDThe specified document is invalid.
400PEER_ID_INVALIDThe provided peer id is invalid.
400REACTION_INVALIDThe specified reaction is invalid.

References