contacts.blockFromReplies

Stop getting notifications about thread replies of a certain user in @replies

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.contacts.blockFromReplies({
        deleteMessage: true,
        deleteHistory: true,
        reportSpam: true,
        msgId: 2523879,
        }));
    console.log(result); // prints the result
})();

TL schema

@replies

Parameters

Name

Type

Description

flags

delete_message

Whether to delete the specified message as well

delete_history

Whether to delete all @replies messages from this user as well

report_spam

Whether to also report this user for spam

msg_id

ID of the message in the @replies chat

Result

Updates

Possible errors

Code

Type

Description

Can bots use this methd ?

yes

Telegram allows commenting on a channel post or on a generic supergroup message, thanks to message threads.

Last updated