antijob / neuro-parser

Other
3 stars 0 forks source link

Feature/bot regions #186

Closed explesy closed 3 months ago

explesy commented 4 months ago

Обновленная версия бота

Основные изменения:

Изменения в логике и функциональности:

Технические обновления:

Vldln commented 4 months ago

В самом боте по прежнему показывает команды, которые внутри не работают изображение

Vldln commented 4 months ago

Сохранились

/country - фильтрация инцидентов по странам /region - для РФ также можно выбрать регион

Которые уже не нужны кажется

Vldln commented 4 months ago

Если начать снимать все галки с регионов выдаст

bot_1      | Original description: Too Many Requests: retry after 16
bot_1      | (background on this error at: https://core.telegram.org/bots/faq#my-bot-is-hitting-limits-how-do-i-avoid-this)
bot_1      | Traceback (most recent call last):
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/dispatcher.py", line 309, in _process_update
bot_1      |     response = await self.feed_update(bot, update, **kwargs)
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/dispatcher.py", line 158, in feed_update
bot_1      |     response = await self.update.wrap_outer_middleware(
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/middlewares/error.py", line 25, in __call__
bot_1      |     return await handler(event, data)
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/middlewares/user_context.py", line 49, in __call__
bot_1      |     return await handler(event, data)
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/fsm/middleware.py", line 42, in __call__
bot_1      |     return await handler(event, data)
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/event/telegram.py", line 121, in trigger
bot_1      |     return await wrapped_inner(event, kwargs)
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/event/handler.py", line 43, in call
bot_1      |     return await wrapped()
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/dispatcher.py", line 276, in _listen_update
bot_1      |     return await self.propagate_event(update_type=update_type, event=event, **kwargs)
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/router.py", line 142, in propagate_event
bot_1      |     return await observer.wrap_outer_middleware(_wrapped, event=event, data=kwargs)
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/router.py", line 137, in _wrapped
bot_1      |     return await self._propagate_event(
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/router.py", line 170, in _propagate_event
bot_1      |     response = await router.propagate_event(update_type=update_type, event=event, **kwargs)
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/router.py", line 142, in propagate_event
bot_1      |     return await observer.wrap_outer_middleware(_wrapped, event=event, data=kwargs)
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/router.py", line 137, in _wrapped
bot_1      |     return await self._propagate_event(
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/router.py", line 162, in _propagate_event
bot_1      |     response = await observer.trigger(event, **kwargs)
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/event/telegram.py", line 121, in trigger
bot_1      |     return await wrapped_inner(event, kwargs)
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/event/handler.py", line 43, in call
bot_1      |     return await wrapped()
bot_1      |   File "/code/server/apps/bot/handlers/utils.py", line 47, in wrapper
bot_1      |     return await func(event, *args, channel=channel, **kwargs)
bot_1      |   File "/code/server/apps/bot/handlers/country.py", line 40, in category_config_callback
bot_1      |     await callback.message.edit_reply_markup(reply_markup=keyboard)
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/methods/base.py", line 84, in emit
bot_1      |     return await bot(self)
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/client/bot.py", line 482, in __call__
bot_1      |     return await self.session(self, method, timeout=request_timeout)
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/client/session/base.py", line 254, in __call__
bot_1      |     return cast(TelegramType, await middleware(bot, method))
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/client/session/aiohttp.py", line 189, in make_request
bot_1      |     response = self.check_response(
bot_1      |   File "/usr/local/lib/python3.9/site-packages/aiogram/client/session/base.py", line 110, in check_response
bot_1      |     raise TelegramRetryAfter(
bot_1      | aiogram.exceptions.TelegramRetryAfter: Telegram server says - Flood control exceeded on method 'EditMessageReplyMarkup' in chat -4012609162. Retry in 16 seconds.
bot_1      | Original description: Too Many Requests: retry after 16
bot_1      | (background on this error at: https://core.telegram.org/bots/faq#my-bot-is-hitting-limits-how-do-i-avoid-this)
Vldln commented 3 months ago

image Можно выбрать брянскую область и страну молдова, почему так?

Плюс нет мульти добавления стран и регионов

Vldln commented 3 months ago

В старте бота по прежнему команды, их там быть не должно так как они не работают image

Vldln commented 3 months ago

Кнопки стран и регионов так же не работают в чате непонятно зачем они оставлены image

Vldln commented 3 months ago

image Но инцидент по источнику image

explesy commented 3 months ago

Кнопки стран и регионов так же не работают в чате непонятно зачем они оставлены image А у тебя точно свежая версия? В messages.py где лежат все сообщения бота, таких сейчас нет