Closed
Description
Checklist
- I am sure the error is coming from aiogram code
- I have searched in the issue tracker for similar bug reports, including closed ones
Operating system
Manjaro
Python version
3.10.x
aiogram version
3.0b4
Expected behavior
According to the documentation, you can pass arbitrary kwargs to Dispatcher's constructor.
Current behavior
Apparently, that's not possible. The code below results in the following error:
Traceback (most recent call last):
File "/home/groosha/PycharmProjects/aiogram-3.x-playground/bot.py", line 6, in <module>
dp = Dispatcher(another="hello")
File "/home/groosha/PycharmProjects/aiogram-3.x-playground/venv/lib/python3.10/site-packages/aiogram/dispatcher/dispatcher.py", line 52, in __init__
super(Dispatcher, self).__init__(**kwargs)
TypeError: Router.__init__() got an unexpected keyword argument 'another'
Steps to reproduce
- Run the code below
Code example
import asyncio
from aiogram import Bot, Dispatcher
bot = Bot(token="TOKEN")
dp = Dispatcher(another="hello")
async def main():
await dp.start_polling(bot)
if __name__ == "__main__":
asyncio.run(main())
Logs
No response
Additional information
This bug was also reported at https://t.me/aiogram_ru/1170161