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

Function handleClearCacheAction

admin_board/admin_board.ts:1347–1372  ·  view source on GitHub ↗
(
  msg: Api.Message,
  rawText: string,
)

Source from the content-addressed store, hash-verified

1345 linkPreview: false,
1346 });
1347
1348 const removedCount = await clearAvgCache(target);
1349
1350 await msg.edit({
1351 text: [
1352 `🧹 <b>缓存已清理</b>`,
1353 buildTargetDisplay(target),
1354 `清理条目: <code>${removedCount}</code>`,
1355 `说明: <code>已清理周日均和用户信息缓存,席位锁定数据不受影响</code>`,
1356 ].join("\n"),
1357 parseMode: "html",
1358 linkPreview: false,
1359 });
1360}
1361
1362async function handleTrimAction(
1363 msg: Api.Message,
1364 rawText: string,
1365): Promise<void> {
1366 const remainder = getTextAfterTokens(rawText, 2);
1367 const { limit, targetArg } = parseTrimArgs(remainder);
1368
1369 if (!limit) {
1370 await msg.edit({
1371 text: `❌ 参数不足\n\n<code>rm</code> 的人数参数是必填项。\n\n用法:\n<code>${htmlEscape(
1372 commandName,
1373 )} rm 正整数 [对话id/@username]</code>`,
1374 parseMode: "html",
1375 linkPreview: false,

Callers 1

AdminBoardPluginClass · 0.85

Calls 5

getTextAfterTokensFunction · 0.85
resolveTargetChatFunction · 0.85
buildTargetDisplayFunction · 0.85
clearAvgCacheFunction · 0.85
editMethod · 0.45

Tested by

no test coverage detected