Skip to main content

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

NameTypeRequiredDescription
PeerInputEncryptedChatyesSecret chat ID
TypingboolyesTyping.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

CodeTypeDescription
400CHAT_ID_INVALIDThe provided chat id is invalid.

References