mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40:15 +08:00
Improve command descriptions
This commit is contained in:
parent
b6794a8826
commit
1ae6b1f13c
@ -71,7 +71,7 @@ public object BuiltInCommands {
|
|||||||
|
|
||||||
public object HelpCommand : SimpleCommand(
|
public object HelpCommand : SimpleCommand(
|
||||||
ConsoleCommandOwner, "help",
|
ConsoleCommandOwner, "help",
|
||||||
description = "Command list",
|
description = "查看指令帮助",
|
||||||
), BuiltInCommandInternal {
|
), BuiltInCommandInternal {
|
||||||
@Handler
|
@Handler
|
||||||
public suspend fun CommandSender.handle() {
|
public suspend fun CommandSender.handle() {
|
||||||
@ -95,7 +95,7 @@ public object BuiltInCommands {
|
|||||||
|
|
||||||
public object StopCommand : SimpleCommand(
|
public object StopCommand : SimpleCommand(
|
||||||
ConsoleCommandOwner, "stop", "shutdown", "exit",
|
ConsoleCommandOwner, "stop", "shutdown", "exit",
|
||||||
description = "Stop the whole world.",
|
description = "关闭 Mirai Console",
|
||||||
), BuiltInCommandInternal {
|
), BuiltInCommandInternal {
|
||||||
|
|
||||||
private val closingLock = Mutex()
|
private val closingLock = Mutex()
|
||||||
@ -130,10 +130,10 @@ public object BuiltInCommands {
|
|||||||
|
|
||||||
public object LoginCommand : SimpleCommand(
|
public object LoginCommand : SimpleCommand(
|
||||||
ConsoleCommandOwner, "login", "登录",
|
ConsoleCommandOwner, "login", "登录",
|
||||||
description = "Log in a bot account.",
|
description = "登录一个账号",
|
||||||
), BuiltInCommandInternal {
|
), BuiltInCommandInternal {
|
||||||
@Handler
|
@Handler
|
||||||
public suspend fun CommandSender.handle(id: Long, password: String) {
|
public suspend fun CommandSender.handle(@Name("qq") id: Long, password: String) {
|
||||||
kotlin.runCatching {
|
kotlin.runCatching {
|
||||||
MiraiConsole.addBot(id, password).alsoLogin()
|
MiraiConsole.addBot(id, password).alsoLogin()
|
||||||
}.fold(
|
}.fold(
|
||||||
|
Loading…
Reference in New Issue
Block a user