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

Method handleSmartSend

aff/aff.ts:167–184  ·  view source on GitHub ↗
(msg: Api.Message)

Source from the content-addressed store, hash-verified

165
166 if (affs.length === 0) {
167 await msg.edit({
168 text: `❌ <b>暂无Aff信息</b>\n\n💡 请回复一条消息使用 <code>${mainPrefix}aff save</code> 保存`,
169 parseMode: "html"
170 });
171 return;
172 }
173
174 if (affs.length === 1) {
175 await this.sendAffContent(msg, affs[0]);
176 return;
177 }
178
179 await this.listAffs(msg);
180 }
181
182 // 发送指定序号
183 private async sendAffByIndex(msg: Api.Message, index: number): Promise<void> {
184 const affs = await this.getAffs();
185 // 用户输入通常是 1-based,所以减 1
186 const realIndex = index - 1;
187

Callers 1

handleAffCommandMethod · 0.95

Calls 4

getAffsMethod · 0.95
sendAffContentMethod · 0.95
listAffsMethod · 0.95
editMethod · 0.45

Tested by

no test coverage detected