Using bardia's gpt-discord-bot template

Question:
Keeps throwing errors. Happens at step 7 in readme.md, when i run python -m src.main
Repl link:
https://replit.com/@ChaosSymmetry/gpt-discord-bot#src/constants.py

Traceback (most recent call last):
  File "/nix/store/hd4cc9rh83j291r5539hkf6qd8lgiikb-python3-3.10.8/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/nix/store/hd4cc9rh83j291r5539hkf6qd8lgiikb-python3-3.10.8/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/runner/gpt-discord-bot/src/main.py", line 5, in <module>
    from src.constants import (
  File "/home/runner/gpt-discord-bot/src/constants.py", line 34, in <module>
    SERVER_TO_MODERATION_CHANNEL[int(values[0])] = int(values[1])
IndexError: list index out of range

Please help… @bardia or anyone else

When I try to run the code with you link given up there, I didn’t see your error but instead I saw a code exit from somewhere in some program saying

No such file: RED

and exit with code 2, which I have no idea where the program raising this exit is at

1 Like

Running the program the normal way won’t do anything. I am getting stuck when I run python -m src.main as dictated in the readme.md file step 7. For this to work correctly you may need to fork the repl and add your own secrets.