Update _on_users

This commit is contained in:
AlberLC
2022-11-30 01:48:08 +01:00
parent 113dee6bd8
commit d370909e68

View File

@@ -300,11 +300,14 @@ class FlanaBot(Connect4Bot, PenaltyBot, PollBot, ScraperBot, WeatherBot, MultiBo
await self.delete_message(message) await self.delete_message(message)
bot_message = await self.send( bot_message = await self.send(
f"<b>{len(user_names)} usuario{'' if len(user_names) == 1 else 's'}:</b>", f"<b>{len(user_names)} usuario{'' if len(user_names) == 1 else 's'}:</b>",
message
)
await self.edit(
f"<b>{len(user_names)} usuario{'' if len(user_names) == 1 else 's'}:</b>\n{joined_user_names}\n\n<b>Filtrar usuarios por roles:</b>",
flanautils.chunks([f'{role_name}' for role_name in role_names], 5), flanautils.chunks([f'{role_name}' for role_name in role_names], 5),
message, bot_message,
buttons_key=ButtonsGroup.USERS buttons_key=ButtonsGroup.USERS
) )
await self.edit(f"<b>{len(user_names)} usuario{'' if len(user_names) == 1 else 's'}:</b>\n{joined_user_names}\n\n<b>Filtrar usuarios por roles:</b>", bot_message)
async def _on_users_button_press(self, message: Message): async def _on_users_button_press(self, message: Message):
await self.accept_button_event(message) await self.accept_button_event(message)