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

Function unmuteChat

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

Source from the content-addressed store, hash-verified

457 await client.invoke(new Api.account.UpdateNotifySettings({
458 peer: new Api.InputNotifyPeer({ peer }),
459 settings: new Api.InputPeerNotifySettings({ muteUntil: 2147483647, showPreviews: false, silent: true })
460 }));
461 } catch (e) { log(LogLevel.ERROR, `mute failed ${userId}`, e); }
462}
463
464async function blockUser(client: TelegramClient, userId: number) {
465 try {
466 const peer = await resolveInputPeer(client, userId);
467 await client.invoke(new Api.contacts.Block({ id: peer }));
468 log(LogLevel.INFO, `Blocked ${userId}`);
469 } catch (e) { log(LogLevel.ERROR, `block failed ${userId}`, e); }
470}

Callers 1

runPassActionsFunction · 0.85

Calls 1

logFunction · 0.85

Tested by

no test coverage detected