Skip to main content

channels.updateColor

Update the accent color and background custom emoji » of a channel.

func (c *Client) ChannelsUpdateColor(ctx context.Context, request *ChannelsUpdateColorRequest) (UpdatesClass, error)

Calling this method

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

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

Parameters

NameTypeRequiredDescription
ForProfileboolWhether 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.
ChannelInputChannelClassyesChannel whose accent color should be changed.
ColorintID of the accent color palette » to use (not RGB24, see here » for more info); if not set, the default palette is used.
BackgroundEmojiIDint64Custom emoji ID used in the accent color pattern.

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400BOOSTS_REQUIREDThe specified channel must first be boosted by its users in order to perform this action.
400CHANNEL_INVALIDThe provided channel is invalid.

References