From db9ccbf81a7e068f5e7aec4cd91a5f6e1cbd3df6 Mon Sep 17 00:00:00 2001 From: AlberLC Date: Thu, 7 Jul 2022 07:39:42 +0200 Subject: [PATCH] Use str.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 fd39df6..f6a997e 100644 --- a/flanabot/bots/flana_bot.py +++ b/flanabot/bots/flana_bot.py @@ -487,7 +487,7 @@ class FlanaBot(MultiBot, ABC): await self.delete_message(message) discarded_words = {*constants.KEYWORDS['poll'], self.name.lower(), f'<@{self.id}>'} - if final_options := [f'{option[0].upper()}{option[1:]}' for option in self._get_options(message.text, discarded_words)]: + if final_options := [option.capitalize() 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)