From 529f4156fd89cb92726972e5816e0fe18e4db926 Mon Sep 17 00:00:00 2001 From: bpavuk Date: Thu, 11 Jul 2024 16:47:57 +0300 Subject: [PATCH] reverted elvis fold --- RightsChangerBot/src/main/kotlin/RightsChanger.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RightsChangerBot/src/main/kotlin/RightsChanger.kt b/RightsChangerBot/src/main/kotlin/RightsChanger.kt index 9381a29..936438b 100644 --- a/RightsChangerBot/src/main/kotlin/RightsChanger.kt +++ b/RightsChangerBot/src/main/kotlin/RightsChanger.kt @@ -504,7 +504,9 @@ suspend fun main(args: Array) { strictlyOn { state -> val chatMember = getChatMember(state.channelId, state.userId).administratorChatMemberOrNull() - ?: return@strictlyOn null + if (chatMember == null) { + return@strictlyOn null + } send( state.context, replyMarkup = buildAdminRightsKeyboard(