mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-26 07:20:09 +08:00
Improve exception message for PermissionDeniedException
This commit is contained in:
parent
f28df741c8
commit
ec0ec396ef
@ -197,8 +197,8 @@ internal class MemberImpl constructor(
|
||||
private fun checkBotPermissionHigherThanThis(operationName: String) {
|
||||
check(group.botPermission > this.permission) {
|
||||
throw PermissionDeniedException(
|
||||
"`$operationName` operation requires bot to have a higher permission than the target member, " +
|
||||
"but bot's is ${group.botPermission}, target's is ${this.permission}"
|
||||
"`$operationName` operation requires a higher permission, while" +
|
||||
"${group.botPermission} < ${this.permission}"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user