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
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPeerClass | yes | Group where to apply changes |
AvailableReactions | ChatReactionsClass | yes | Allowed reaction emojis |
ReactionsLimit | int | — | This 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. |
PaidEnabled | bool | — | If 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
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHAT_ADMIN_REQUIRED | You must be an admin in this chat to do this. |
| 400 | CHAT_NOT_MODIFIED | No changes were made to chat information because the new information you passed is identical to the current information. |
| 400 | DOCUMENT_INVALID | The specified document is invalid. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | REACTION_INVALID | The specified reaction is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.setChatAvailableReactions#864b2581