Blue-Robin-Taken / nestling-bot

Discord bot with a lot of functionality. Made in py-cord (fork of discord.py)
https://discord.gg/7sKSGEmXw2
MIT License
3 stars 2 forks source link

Bob Ross command is broken #6

Open Blue-Robin-Taken opened 7 months ago

Blue-Robin-Taken commented 7 months ago

Describe the bug The file can't be read cause it's not created on startup

To Reproduce Run the bot

Expected behavior Should give something like this:

Ignoring exception in on_connect
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.11/site-packages/discord/client.py", line 400, in _run_event
    await coro(*args, **kwargs)
  File "/home/container/main.py", line 77, in on_connect
    with open(os.path.abspath(path="Fun/data/bobross.json"), "w+") as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/home/container/Fun/data/bobross.json'

Additional context I'll fix this when I can, but if someone else makes a good PR I'll accept it