finlaysawyer/discord-uptime

whats the startup command?

Closed this issue · 5 comments

whats the startup command?

python -m bot

it gives this error
[Pterodactyl Daemon]: Finished pulling Docker container image
Python 3.11.2
:/home/container$ python -m bot
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/home/container/bot.py", line 60, in
asyncio.run(main())
File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/container/bot.py", line 56, in main
await DiscordUptime().start(get_config("token"))
^^^^^^^^^^^^^^^
File "/home/container/bot.py", line 27, in init
command_prefix=get_config("prefix"),
^^^^^^^^^^^^^^^^^^^^
File "/home/container/utils/config.py", line 35, in get_config
file = load_config_file("config.json")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/container/utils/config.py", line 7, in load_config_file
with open(file) as config:
^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'config.json'

Read https://github.com/finlaysawyer/discord-uptime#installation -- you need to copy config.example.json to config.json and edit the values

but i did that

if you're running the Docker image you need to mount the config file as a volume - again refer to the README