diff --git a/multibot/bots/multi_bot.py b/multibot/bots/multi_bot.py index c1da15d..67d56ab 100644 --- a/multibot/bots/multi_bot.py +++ b/multibot/bots/multi_bot.py @@ -541,8 +541,6 @@ async def _on_users(self, message: Message): ) async def _on_users_button_press(self, message: Message): - await self._accept_button_event(message) - try: button_role_name = message.button_pressed_text.split(maxsplit=1)[1] except IndexError: @@ -550,6 +548,8 @@ async def _on_users_button_press(self, message: Message): if not (role_names := [role.name for role in await self.get_roles(message.chat)]) or button_role_name not in role_names: return + await self._accept_button_event(message) + new_buttons = [] selected_role_names = [] for row in message.original_object.components: