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

Method formatUser

aban/aban.ts:359–373  ·  view source on GitHub ↗
(user: any, userId: number)

Source from the content-addressed store, hash-verified

357 }
358
359 return undefined;
360 }
361
362 /**
363 * 按用户数字 ID 解析 InputPeer。
364 * 目标不必在当前聊天:本地缓存 → 当前群 → 跨管理群 getParticipant → 频道 accessHash=0 试探。
365 */
366 private static async resolveNumericUser(
367 client: TelegramClient,
368 message: Api.Message,
369 userId: number,
370 ): Promise<{ user: any; participant?: any }> {
371 let entity = await this.safeGetEntity(client, userId);
372 let participant = entity
373 ? await this.safeGetInputEntity(client, entity)
374 : await this.safeGetInputEntity(client, userId);
375
376 if (!participant) {

Callers 3

handleBasicCommandMethod · 0.80
handleSuperBanMethod · 0.80
handleSuperUnbanMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected