MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / deleteHistory

Function deleteHistory

pmcaptcha/pmcaptcha.ts:441–447  ·  view source on GitHub ↗
(client: TelegramClient, userId: number)

Source from the content-addressed store, hash-verified

439 try {
440 const peer = await client.getInputEntity(userId);
441 await client.invoke(new Api.messages.DeleteHistory({ peer, revoke: false, maxId: 0 }));
442 log(LogLevel.INFO, `Deleted history ${userId}`);
443 } catch (e) { log(LogLevel.ERROR, `delete history failed ${userId}`, e); }
444}
445
446async function reportSpam(client: TelegramClient, userId: number) {
447 try {
448 const peer = await client.getInputEntity(userId);
449 await client.invoke(new Api.account.ReportPeer({
450 peer, reason: new Api.InputReportReasonSpam(), message: "spam"

Callers

nothing calls this directly

Calls 1

logFunction · 0.85

Tested by

no test coverage detected