| 516 | |
| 517 | private async runSingleSign(target: SignTarget): Promise<SignResult> { |
| 518 | const client = await getGlobalClient(); |
| 519 | if (!client) return { success: false, error: "客户端未初始化" }; |
| 520 | try { |
| 521 | const sent = await client.sendMessage(target.target, { message: target.command }); |
| 522 | const sentId = Number((sent as any)?.id || 0); |
| 523 | const start = Math.floor(Date.now() / 1000); |
| 524 | |
| 525 | const first = await this.waitForNewMessage(client, target.target, start, 10_000, (m) => { |
| 526 | if (m.out) return false; |
| 527 | if (this.hasMatcher(target)) return !!this.findCallbackButton(m, target); |