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

Function resolvePermissionTarget

aban/aban.ts:463–471  ·  view source on GitHub ↗

* 把 ManagedGroup 转成 PermissionManager 那一组方法能识别的 chatId。 * - channel:返回 InputChannel(带 accessHash),走 Api.channels.GetParticipant * - basic group:返回 PeerChat-like 对象,让 getChatKind/getBasicGroupChatId 走 chat 路径

(
  client: TelegramClient,
  group: ManagedGroup
)

Source from the content-addressed store, hash-verified

461 0,
462 )
463 : 0;
464
465 const ordered = [
466 ...groups.filter((g) => g.kind === "channel"),
467 ...groups.filter((g) => g.kind === "chat"),
468 ];
469
470 const limit = (await ensurePLimit())(6);
471 let found: { participant?: any; entity?: any } = {};
472
473 await Promise.all(
474 ordered.map((group) =>

Callers 2

handleSuperBanMethod · 0.85
handleSuperUnbanMethod · 0.85

Calls 1

resolveChannelInputFunction · 0.85

Tested by

no test coverage detected