MCPcopy Index your code
hub / github.com/TeleBoxOrg/TeleBox_Plugins / edit

Method edit

im/im.ts:118–132  ·  view source on GitHub ↗
(msg: Api.Message, text: string, options: { parseMode?: "html" | "md", deleteAfter?: number } = {})

Source from the content-addressed store, hash-verified

116// ==================== 消息管理器 ====================
117class MessageManager {
118 static async edit(msg: Api.Message, text: string, options: { parseMode?: "html" | "md", deleteAfter?: number } = {}): Promise<void> {
119 const { parseMode = "html", deleteAfter = 10 } = options;
120 try {
121 await msg.edit({ text, parseMode });
122 if (deleteAfter > 0) {
123 const timer = setTimeout(() => {
124 clearTrackedTimer(timer);
125 msg.delete({ revoke: true }).catch(() => {});
126 }, deleteAfter * 1000);
127 trackTimer(timer);
128 }
129 } catch (e) {
130 // Ignore errors if message was deleted or something
131 }
132 }
133}
134
135// ==================== 配置管理器 ====================

Callers 15

requireSettingsFunction · 0.45
handleSaveMethod · 0.45
handleToggleMethod · 0.45
handleModeMethod · 0.45
handleShowMethod · 0.45
handleStatusMethod · 0.45
handleTextMethod · 0.45
handleTimezoneMethod · 0.45
handleUpdateMethod · 0.45
handleTimezoneFormatMethod · 0.45
handleToggleSettingMethod · 0.45

Calls 3

clearTrackedTimerFunction · 0.70
trackTimerFunction · 0.70
deleteMethod · 0.45

Tested by

no test coverage detected