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(