1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +00:00

Fix class comparison in ChatMember.isMemberStrict and ChatMember.isAdministratorStrict

This commit is contained in:
McModder 2024-08-28 16:34:55 +03:00
parent 38e1d271ba
commit 5175395be2
No known key found for this signature in database
GPG Key ID: A47A5642B5DA64BE

View File

@ -14,11 +14,11 @@ val ChatMember.isAdministrator: Boolean get() = this is AdministratorChatMember
/** /**
* Checks if member is strictly [MemberChatMember], not any derivatives * Checks if member is strictly [MemberChatMember], not any derivatives
*/ */
val ChatMember.isMemberStrict: Boolean get() = this::class == MemberChatMemberImpl::class val ChatMember.isMemberStrict: Boolean get() = this is MemberChatMemberImpl
/** /**
* Checks if member is strictly [AdministratorChatMember], not any derivatives * Checks if member is strictly [AdministratorChatMember], not any derivatives
*/ */
val ChatMember.isAdministratorStrict: Boolean get() = this::class == AdministratorChatMemberImpl::class val ChatMember.isAdministratorStrict: Boolean get() = this is AdministratorChatMemberImpl
val ChatMember.hasSpecialRights: Boolean get() = this is SpecialRightsChatMember val ChatMember.hasSpecialRights: Boolean get() = this is SpecialRightsChatMember
val ChatMember.isKickedOrRestricted: Boolean get() = this is BannedChatMember val ChatMember.isKickedOrRestricted: Boolean get() = this is BannedChatMember