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
| Name | Type | Required | Description |
|---|---|---|---|
UserID | InputUserClass | yes | The user whose emoji status should be changed |
EmojiStatus | EmojiStatusClass | yes | The emoji status |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | USER_BOT_REQUIRED | This method can only be called by a bot. |
| 400 | USER_ID_INVALID | The provided user ID is invalid. |
| 403 | USER_PERMISSION_DENIED | The user hasn't granted or has revoked the bot's access to change their emoji status using bots.toggleUserEmojiStatusPermission. |
References
- Official documentation
- Generated Go reference
- TL definition:
bots.updateUserEmojiStatus#ed9f30c5