Skip to main content

bots.updateUserEmojiStatus

Change the emoji status of a user (invoked by bots, see here » for more info on the full flow)

func (c *Client) BotsUpdateUserEmojiStatus(ctx context.Context, request *BotsUpdateUserEmojiStatusRequest) (bool, error)

Calling this method

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

res, err := api.BotsUpdateUserEmojiStatus(ctx, &tg.BotsUpdateUserEmojiStatusRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})

Parameters

NameTypeRequiredDescription
UserIDInputUserClassyesThe user whose emoji status should be changed
EmojiStatusEmojiStatusClassyesThe emoji status

Returns

bool

Possible errors

CodeTypeDescription
400USER_BOT_REQUIREDThis method can only be called by a bot.
400USER_ID_INVALIDThe provided user ID is invalid.
403USER_PERMISSION_DENIEDThe user hasn't granted or has revoked the bot's access to change their emoji status using bots.toggleUserEmojiStatusPermission.

References