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

Method handleResumeTask

sendat/sendat.ts:597–610  ·  view source on GitHub ↗
(msg: Api.Message, taskIdStr: string)

Source from the content-addressed store, hash-verified

595
596 // 权限检查:只能删除自己的任务或者是管理员
597 const chatId = msg.chatId?.toJSNumber() || 0;
598 const userId = msg.senderId?.toJSNumber();
599
600 if (task.cid !== chatId && !(await this.isSudoUser(userId))) {
601 await msg.edit({ text: "❌ 只能删除自己的任务", parseMode: "html" });
602 return;
603 }
604
605 const success = await this.taskManager.removeTask(taskId);
606 if (success) {
607 await msg.edit({ text: `✅ 已删除任务 #${taskId}`, parseMode: "html" });
608 } else {
609 await msg.edit({ text: "❌ 删除任务失败", parseMode: "html" });
610 }
611 }
612
613 private async handlePauseTask(msg: Api.Message, taskIdStr: string): Promise<void> {

Callers 1

handleSendAtCommandMethod · 0.95

Calls 2

resumeTaskMethod · 0.80
editMethod · 0.45

Tested by

no test coverage detected