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

Method handleError

clean/clean.ts:489–504  ·  view source on GitHub ↗
(msg: Api.Message, error: any)

Source from the content-addressed store, hash-verified

487 successCount++;
488 } else {
489 failedCount++;
490 const displayName = entity.type === 'user'
491 ? `${entity.firstName}(${entity.id})`
492 : `${entity.title || entity.firstName}[${entity.type}](${entity.id})`;
493 failedEntities.push(displayName);
494 }
495 await sleep(500);
496 }
497
498 let statsText = "";
499 if (entityStats.users > 0) statsText += `👤 用户: ${entityStats.users} `;
500 if (entityStats.channels > 0) statsText += `📢 频道: ${entityStats.channels} `;
501 if (entityStats.chats > 0) statsText += `💬 群组: ${entityStats.chats}`;
502
503 let resultText = "";
504 if (failedCount > 0) {
505 resultText = `✅ <b>解封完成</b>\n\n${statsText}\n成功: <code>${successCount}</code> 个\n失败: <code>${failedCount}</code> 个`;
506 } else {
507 resultText = `✅ <b>解封完成</b>\n\n${statsText}\n已成功解封 <code>${successCount}</code> 个实体`;

Callers 2

handleCleanMethod · 0.95
cleanDeletedPMMethod · 0.95

Calls 3

editMessageMethod · 0.95
errorMethod · 0.80
htmlEscapeFunction · 0.70

Tested by

no test coverage detected