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

Function isRestrictedGroup

dme/dme.ts:656–674  ·  view source on GitHub ↗

* 检测群组是否禁止转发和复制(受限群组)

(client: TelegramClient, chatEntity: any)

Source from the content-addressed store, hash-verified

654 return (chatEntity as any).noforwards === true;
655 }
656
657 if (chatEntity.className === "Chat") {
658 // 对于普通群组,检查migratedTo属性等
659 return false; // 普通群组通常不受此限制
660 }
661
662 return false;
663 } catch (error) {
664 console.log(`[DME] 检测群组限制失败:`, error);
665 return false;
666 }
667}
668
669/**
670 * 传统遍历消息流式处理 - 适用于禁止转发和复制的群组
671 */
672async function traditionalStreamProcessing(
673 client: TelegramClient,
674 chatEntity: any,
675 myId: bigint,
676 userRequestedCount: number,
677 isAntiRecallMode: boolean = false,

Callers 2

quickDeleteMyMessagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected