mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-11 02:50:15 +08:00
Add AutoLoginCommand.list
This commit is contained in:
parent
9d1294603d
commit
48021adf18
@ -228,6 +228,30 @@ public object BuiltInCommands {
|
|||||||
ConfigurationKey::class with ConfigurationKey.Parser
|
ConfigurationKey::class with ConfigurationKey.Parser
|
||||||
}
|
}
|
||||||
), BuiltInCommandInternal {
|
), BuiltInCommandInternal {
|
||||||
|
@Description("查看自动登录账号列表")
|
||||||
|
@SubCommand
|
||||||
|
public suspend fun CommandSender.list() {
|
||||||
|
sendMessage(buildString {
|
||||||
|
for (account in AutoLoginConfig.accounts) {
|
||||||
|
if (account.account == "123456") continue
|
||||||
|
append("- ")
|
||||||
|
append("账号: ")
|
||||||
|
append(account.account)
|
||||||
|
appendLine()
|
||||||
|
append(" 密码: ")
|
||||||
|
append(account.password.value)
|
||||||
|
appendLine()
|
||||||
|
|
||||||
|
if (account.configuration.isNotEmpty()) {
|
||||||
|
appendLine(" 配置:")
|
||||||
|
for ((key, value) in account.configuration) {
|
||||||
|
append(" $key = $value")
|
||||||
|
}
|
||||||
|
appendLine()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
@Description("添加自动登录")
|
@Description("添加自动登录")
|
||||||
@SubCommand
|
@SubCommand
|
||||||
|
Loading…
Reference in New Issue
Block a user