mirai-core / net.mamoe.mirai.contact / checkBotPermission

checkBotPermission

inline fun Group.checkBotPermission(required: MemberPermission, crossinline lazyMessage: () -> String = { "Permission denied: required $required, got actual $botPermission for $bot in group $id" }): Unit

要求 Bot 在这个群里的权限为 required, 否则抛出异常 PermissionDeniedException

Exceptions

PermissionDeniedException -