messages.setEncryptedTyping
Send typing event by the current user to a secret chat.
func (c *Client) MessagesSetEncryptedTyping(ctx context.Context, request *MessagesSetEncryptedTypingRequest) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.MessagesSetEncryptedTyping(ctx, &tg.MessagesSetEncryptedTypingRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputEncryptedChat | yes | Secret chat ID |
Typing | bool | yes | Typing.Possible values:(boolTrue), if the user started typing and more than 5 seconds have passed since the last request(boolFalse), if the user stopped typing |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | CHAT_ID_INVALID | The provided chat id is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
messages.setEncryptedTyping#791451ed