Layer 220
MessagesSetChatAvailableReactions
Change the set of message reactions that can be used in a certain group, supergroup or channel
method
Users
messages.setChatAvailableReactions#864b2581 flags:# peer:InputPeer available_reactions:ChatReactions reactions_limit:flags.0?int paid_enabled:flags.1?Bool = Updates;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| Peer | InputPeer | Group where to apply changes |
| AvailableReactions | ChatReactions | Allowed reaction emojis |
| ReactionsLimit | flags.0?int | This flag may be used to impose a custom limit of unique reactions (i. e. a customizable version of app Config. reactions_uniq_max ); this field and the other info set by the method will then be available to users in channel Full and chat Full. If this flag is not set, the previously configured reactions_limit will not be altered. |
| PaidEnabled | flags.1?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
UpdatesPossible 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. |
Gogram Example
// MessagesSetChatAvailableReactions - using Params struct result, err := client.MessagesSetChatAvailableReactions(&tg.MessagesSetChatAvailableReactionsParams{ Peer: &tg.InputPeerUser{UserID: int64(123456789)}, AvailableReactions: &tg.ChatReactions{}, // Optional fields: // ReactionsLimit: 0, // PaidEnabled: true, }) if err != nil { // handle error } // result is *tg.Updates