Add permission check

This commit is contained in:
Him188 2020-02-07 14:18:25 +08:00
parent fa515ed3b9
commit abfa13c29b

View File

@ -322,6 +322,7 @@ internal class GroupImpl(
override var botPermission: MemberPermission = MemberPermission.MEMBER
override suspend fun quit(): Boolean {
check(botPermission != MemberPermission.OWNER) { "An owner cannot quit from a owning group" }
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}