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

Method handlePauseTask

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

Source from the content-addressed store, hash-verified

580 }
581 }
582
583 private async handlePauseTask(msg: Api.Message, taskIdStr: string): Promise<void> {
584 const taskId = parseInt(taskIdStr);
585 if (isNaN(taskId)) {
586 await msg.edit({ text: "❌ 请输入有效的任务ID", parseMode: "html" });
587 return;
588 }
589
590 const success = await this.taskManager.pauseTask(taskId);
591 if (success) {
592 await msg.edit({ text: `⏸️ 已暂停任务 #${taskId}`, parseMode: "html" });
593 } else {
594 await msg.edit({ text: "❌ 暂停任务失败", parseMode: "html" });
595 }
596 }
597
598 private async handleResumeTask(msg: Api.Message, taskIdStr: string): Promise<void> {

Callers 1

handleSendAtCommandMethod · 0.95

Calls 2

pauseTaskMethod · 0.80
editMethod · 0.45

Tested by

no test coverage detected