From a2db01fd462d18d51e99a8999cf99148d3e6302e Mon Sep 17 00:00:00 2001 From: AlberLC Date: Tue, 19 Jul 2022 23:44:02 +0200 Subject: [PATCH] Fix polls capitalize --- flanabot/bots/flana_bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flanabot/bots/flana_bot.py b/flanabot/bots/flana_bot.py index b5e4f1b..0570637 100644 --- a/flanabot/bots/flana_bot.py +++ b/flanabot/bots/flana_bot.py @@ -496,7 +496,7 @@ class FlanaBot(MultiBot, ABC): await self.delete_message(message) discarded_words = {*constants.KEYWORDS['poll'], self.name.lower(), f'<@{self.id}>'} - if final_options := [option.capitalize() for option in self._get_options(message.text, discarded_words)]: + if final_options := [f'{option[0].upper()}{option[1:]}' for option in self._get_options(message.text, discarded_words)]: await self.send('Encuesta en curso...', self._distribute_poll_buttons(final_options), message, buttons_key=ButtonsGroup.POLL, contents={'poll': {'is_active': True, 'votes': {option: [] for option in final_options}}}) else: await self.send(random.choice(('¿Y las opciones?', '?', '🤔')), message)