Layer 220
ChannelsUpdateColor
Update the accent color and background custom emoji of a channel.
method
Users
channels.updateColor#d8aa3671 flags:# for_profile:flags.1?true channel:InputChannel color:flags.2?int background_emoji_id:flags.0?long = Updates;
Parameters
| Name | Type | Description |
|---|---|---|
| Flags | # | Flags, see TL conditional fields |
| ForProfile | flags.1?true | Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed. Channels can change both message and profile palettes; supergroups can only change the profile palette, of course after reaching the appropriate boost level. |
| Channel | InputChannel | Channel whose accent color should be changed. |
| Color | flags.2?int | ID of the accent color palette to use (not RGB 24, see here for more info); if not set, the default palette is used. |
| BackgroundEmojiId | flags.0?long | Custom emoji ID used in the accent color pattern. |
Returns
UpdatesPossible Errors
| Code | Type | Description |
|---|---|---|
| 400 | BOOSTS_REQUIRED | The specified channel must first be boosted by its users in order to perform this action. |
| 400 | CHANNEL_INVALID | The provided channel is invalid. |
Gogram Example
// ChannelsUpdateColor - using Params struct result, err := client.ChannelsUpdateColor(&tg.ChannelsUpdateColorParams{ Channel: &tg.InputChannel{ChannelID: int64(123456789), AccessHash: int64(0)}, // Optional fields: // ForProfile: true, // Color: 0, // BackgroundEmojiId: int64(0), }) if err != nil { // handle error } // result is *tg.Updates