(msg: Api.Message, user?: string, pass?: string)
| 476 | return; |
| 477 | } |
| 478 | |
| 479 | await msg.edit({ text: `正在执行: ${displayCommand}` }); |
| 480 | const stdout = await this.runOpenListCommand(installPath, commandArgs); |
| 481 | |
| 482 | // 如果是 random,解析输出 |
| 483 | if (sub === "random") { |
| 484 | const userMatch = stdout.match(/username:\s*(\S+)/i); |
| 485 | const passMatch = stdout.match(/password:\s*(\S+)/i); |
| 486 | if (userMatch) newUser = userMatch[1]; |
| 487 | if (passMatch) newPass = passMatch[1]; |
| 488 | } |
no test coverage detected