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

Method handleReplyMessage

rev/rev.ts:109–136  ·  view source on GitHub ↗
(
		msg: Api.Message,
		replyMsg: Api.Message,
		flipMode: FlipMode,
		invertColors: boolean
	)

Source from the content-addressed store, hash-verified

107 const text = (msg.text || '').trim();
108 return text ? text.split(/\s+/).slice(1) : [];
109 }
110
111 private async handleReplyMessage(
112 msg: Api.Message,
113 replyMsg: Api.Message,
114 flipMode: FlipMode,
115 invertColors: boolean
116 ): Promise<boolean> {
117 const replyText = (replyMsg.message || '').trim();
118 const replyEntities = replyMsg.entities || [];
119
120 // 优先尝试媒体处理
121 const handledMedia = await this.tryHandleMediaTransform(
122 msg,
123 replyMsg,
124 flipMode,
125 invertColors,
126 replyText,
127 replyEntities
128 );
129 if (handledMedia) return true;
130
131 // 回退到文本处理
132 if (replyText) {
133 await this.handleTextReverse(msg, replyText, replyEntities);
134 return true;
135 }
136
137 return false;
138 }
139

Callers 1

REVPluginClass · 0.95

Calls 2

handleTextReverseMethod · 0.95

Tested by

no test coverage detected