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

Function muteChat

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

Source from the content-addressed store, hash-verified

421 if (nameCache.has(userId)) return nameCache.get(userId)!;
422 const user = await fetchUserInfo(client, userId);
423 if (user) {
424 const name = [user.firstName, user.lastName].filter(Boolean).join(" ").trim() || "Unknown";
425 return name;
426 }
427 return String(userId);
428}
429
430function userLink(id: number, name: string): string {
431 return `<a href="tg://user?id=${attrEscape(id)}">${htmlEscape(name)} (${htmlEscape(id)})</a>`;
432}
433
434function isBotFromSender(sender: any): boolean {

Callers 3

runFailActionsFunction · 0.85
executeBlockActionsFunction · 0.85
messageListenerFunction · 0.85

Calls 1

logFunction · 0.85

Tested by

no test coverage detected