Skip to main content

messages.setChatTheme

Change the chat theme of a certain chat, see here » for more info.

func (c *Client) MessagesSetChatTheme(ctx context.Context, request *MessagesSetChatThemeRequest) (UpdatesClass, error)

Calling this method

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

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

Parameters

NameTypeRequiredDescription
PeerInputPeerClassyesPrivate chat where to change theme
ThemeInputChatThemeClassyesThe theme to set.

Returns

UpdatesClass

Possible errors

CodeTypeDescription
400EMOJI_INVALIDThe specified theme emoji is valid.
400EMOJI_NOT_MODIFIEDThe theme wasn't changed.
400PEER_ID_INVALIDThe provided peer id is invalid.

References