Fix permission tips

This commit is contained in:
Him188 2020-09-09 23:06:56 +08:00
parent 9ce468db95
commit cce8c2db16

View File

@ -66,7 +66,7 @@ internal object CommandManagerImpl : CommandManager, CoroutineScope by Coroutine
when (val result = sender.executeCommand(message)) {
is CommandExecuteResult.PermissionDenied -> {
if (!result.command.prefixOptional) {
if (!result.command.prefixOptional || message.content.startsWith(CommandManager.commandPrefix)) {
sender.sendMessage("权限不足")
intercept()
}