(msg: Api.Message)
| 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 |
no test coverage detected