__init__.py 447 B

1234567891011121314
  1. from aiogram import Dispatcher
  2. from app.middlewares.acl import ACLMiddleware
  3. from app.middlewares.check_input import Checker
  4. from app.middlewares.throttling import ThrottlingMiddleware
  5. from app.middlewares.wrapper import WrapperMiddleware
  6. def setup(dp: Dispatcher):
  7. dp.middleware.setup(ThrottlingMiddleware(limit=0.7))
  8. dp.middleware.setup(ACLMiddleware())
  9. dp.middleware.setup(WrapperMiddleware())
  10. dp.middleware.setup(Checker())