mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-11 02:50:15 +08:00
Ignore blank inputs
This commit is contained in:
parent
a13ce6ff17
commit
2223451b70
@ -34,6 +34,7 @@ internal fun startupConsoleThread() {
|
|||||||
try {
|
try {
|
||||||
val next = MiraiConsole.requestInput("").let {
|
val next = MiraiConsole.requestInput("").let {
|
||||||
when {
|
when {
|
||||||
|
it.isBlank() -> it
|
||||||
it.startsWith(CommandManager.commandPrefix) -> it
|
it.startsWith(CommandManager.commandPrefix) -> it
|
||||||
it == "?" -> CommandManager.commandPrefix + BuiltInCommands.HelpCommand.primaryName
|
it == "?" -> CommandManager.commandPrefix + BuiltInCommands.HelpCommand.primaryName
|
||||||
else -> CommandManager.commandPrefix + it
|
else -> CommandManager.commandPrefix + it
|
||||||
|
Loading…
Reference in New Issue
Block a user