messages.setEncryptedTyping
Send typing event by the current user to a secret chat.
Example
const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');
const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});
(async function run() {
const result = await client.invoke(new Api.messages.setEncryptedTyping({
peer: new Api.InputEncryptedChat({...}),
typing: new Api.Bool({...}),
}));
console.log(result); // prints the result
})();
TL schema
boolFalse#bc799737 = Bool;
boolTrue#997275b5 = Bool;
---functions---
messages.setEncryptedTyping#791451ed peer:InputEncryptedChat typing:Bool = Bool;
Parameters
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|
Result
Possible errors
Code
Type
Description
400
CHAT_ID_INVALID
The provided chat id is invalid
Can bots use this methd ?
yes
Related pages
The constructor can be interpreted as a booleantrue value.
Constructor may be interpreted as a booleanfalse value.
Last updated
Was this helpful?