telewater
telewater copied to clipboard
Can't start bot - TypeError: __init__() missing 2 required positional arguments: 'scope' and 'lang_code'
Hi there,
I've installed all modules and filled in the API keys etc, but I get the following error:
Image exists
Traceback (most recent call last):
File "c:\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Python39\Scripts\telewater.exe\__main__.py", line 7, in <module>
File "c:\python39\lib\site-packages\typer\main.py", line 214, in __call__
return get_command(self)(*args, **kwargs)
File "c:\python39\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "c:\python39\lib\site-packages\click\core.py", line 782, in main
rv = self.invoke(ctx)
File "c:\python39\lib\site-packages\click\core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\python39\lib\site-packages\click\core.py", line 610, in invoke
return callback(*args, **kwargs)
File "c:\python39\lib\site-packages\typer\main.py", line 497, in wrapper
return callback(**use_params) # type: ignore
File "c:\python39\lib\site-packages\telewater\cli.py", line 102, in main
start_bot(API_ID, API_HASH, name, token)
File "c:\python39\lib\site-packages\telewater\main.py", line 23, in start_bot
functions.bots.SetBotCommandsRequest(
TypeError: __init__() missing 2 required positional arguments: 'scope' and 'lang_code'
Looking forward to your assistance!
Best regards
You have to set scope and lang_code as well in main.py, see: https://tl.telethon.dev/methods/bots/set_bot_commands.html