diff --git a/flanabot/bots/flana_bot.py b/flanabot/bots/flana_bot.py index f6b2e78..428c6ac 100644 --- a/flanabot/bots/flana_bot.py +++ b/flanabot/bots/flana_bot.py @@ -226,7 +226,7 @@ class FlanaBot(Connect4Bot, PenaltyBot, PollBot, ScraperBot, WeatherBot, MultiBo await self.delete_message(message) await self.send( f'Roles de {message.author.name}:', - self._distribute_buttons(options, vertically=True), + self.distribute_buttons(options, vertically=True), message, buttons_key=ButtonsGroup.ROLES, contents={'user_id': message.author.id} @@ -248,7 +248,7 @@ class FlanaBot(Connect4Bot, PenaltyBot, PollBot, ScraperBot, WeatherBot, MultiBo message.buttons_info.presser_user.roles.append(role) user_role_names.append(role.name) - await self.edit(self._distribute_buttons(await self._role_state_options(message, user_role_names), vertically=True), message) + await self.edit(self.distribute_buttons(await self._role_state_options(message, user_role_names), vertically=True), message) message.buttons_info.presser_user.save() diff --git a/flanabot/bots/penalty_bot.py b/flanabot/bots/penalty_bot.py index 9bd7862..6e226cf 100644 --- a/flanabot/bots/penalty_bot.py +++ b/flanabot/bots/penalty_bot.py @@ -94,14 +94,14 @@ class PenaltyBot(MultiBot, ABC): @admin(send_negative=True) async def _on_ban(self, message: Message): for user in await self._find_users_to_punish(message): - await self.ban(user, message, flanautils.words_to_time(await self._filter_mention_ids(message.text, message)), message) + await self.ban(user, message, flanautils.words_to_time(await self.filter_mention_ids(message.text, message)), message) @group @bot_mentioned @admin(send_negative=True) async def _on_mute(self, message: Message): for user in await self._find_users_to_punish(message): - await self.mute(user, message, flanautils.words_to_time(await self._filter_mention_ids(message.text, message)), message) + await self.mute(user, message, flanautils.words_to_time(await self.filter_mention_ids(message.text, message)), message) @ignore_self_message async def _on_new_message_raw(self, message: Message): @@ -118,7 +118,7 @@ class PenaltyBot(MultiBot, ABC): return for user in await self._find_users_to_punish(message): - await self.punish(user, message, flanautils.words_to_time(await self._filter_mention_ids(message.text, message)), message) + await self.punish(user, message, flanautils.words_to_time(await self.filter_mention_ids(message.text, message)), message) async def _on_ready(self): await super()._on_ready() diff --git a/flanabot/bots/poll_bot.py b/flanabot/bots/poll_bot.py index 9d7f7d2..2d5f0f8 100644 --- a/flanabot/bots/poll_bot.py +++ b/flanabot/bots/poll_bot.py @@ -95,7 +95,7 @@ class PollBot(MultiBot, ABC): else: buttons = list(message.contents['poll']['votes'].keys()) - await self.edit(self._distribute_buttons(buttons, vertically=True), message) + await self.edit(self.distribute_buttons(buttons, vertically=True), message) # ---------------------------------------------- # # HANDLERS # @@ -173,7 +173,7 @@ class PollBot(MultiBot, ABC): if final_options := [f'{option[0].upper()}{option[1:]}' for option in self._get_options(message.text, discarded_words)]: await self.send( f"Encuesta {'multirespuesta ' if is_multiple_answer else ''}en curso...", - self._distribute_buttons(final_options, vertically=True), + self.distribute_buttons(final_options, vertically=True), message, buttons_key=ButtonsGroup.POLL, contents={'poll': { diff --git a/flanabot/bots/weather_bot.py b/flanabot/bots/weather_bot.py index de25be3..b80f13b 100644 --- a/flanabot/bots/weather_bot.py +++ b/flanabot/bots/weather_bot.py @@ -50,7 +50,7 @@ class WeatherBot(MultiBot, ABC): original_text_words = flanautils.remove_accents(message.text.lower()) original_text_words = flanautils.remove_symbols(original_text_words, ignore=('-', '.'), replace_with=' ').split() - original_text_words = await self._filter_mention_ids(original_text_words, message, delete_names=True) + original_text_words = await self.filter_mention_ids(original_text_words, message, delete_names=True) # noinspection PyTypeChecker place_words = (