mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 23:50:15 +08:00
Fix permission tips
This commit is contained in:
parent
9ce468db95
commit
cce8c2db16
@ -66,7 +66,7 @@ internal object CommandManagerImpl : CommandManager, CoroutineScope by Coroutine
|
|||||||
|
|
||||||
when (val result = sender.executeCommand(message)) {
|
when (val result = sender.executeCommand(message)) {
|
||||||
is CommandExecuteResult.PermissionDenied -> {
|
is CommandExecuteResult.PermissionDenied -> {
|
||||||
if (!result.command.prefixOptional) {
|
if (!result.command.prefixOptional || message.content.startsWith(CommandManager.commandPrefix)) {
|
||||||
sender.sendMessage("权限不足")
|
sender.sendMessage("权限不足")
|
||||||
intercept()
|
intercept()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user