NoMeansNowastaken / KarutaSniper

A bot to automate collecting cards for the discord game Karuta
GNU General Public License v3.0
25 stars 13 forks source link

Error #6

Closed Natsumi-x closed 1 year ago

Natsumi-x commented 1 year ago

Doesn't seem like it's picking cards for me.

Ignoring exception in on_message Traceback (most recent call last): File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\client.py", line 301, in _run_event await coro(*args, **kwargs) File "C:\Users\Admin\Desktop\KarutaSniper-master\main.py", line 112, in on_message onlyfiles = [ff for ff in listdir("C:\\users\\user\\pycharmprojects\\karuta bot\\temp\\char") if FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\\users\\user\\pycharmprojects\\karuta bot\\temp\\char'

NoMeansNowastaken commented 1 year ago

Thats because I have autism and forgot to make the file path more generic. Should work now

Natsumi-x commented 1 year ago

Runs fine now, still doesn't pick the cards though. It tells me it found cards from an anime, but doesn't try to grab them.

Edit: Seems it grabs cards every now and then. It has grab ready for hours though.

shrekisallah commented 1 year ago

There are two possible reasons:

  1. When the console tells you it found a card, it will try to react to it, however there is no function yet to tell you if the reaction was successful or not, and only tells you if you got the card
  2. Something is going wrong
Natsumi-x commented 1 year ago

For the first point. What is the 'Missed * Cards' function on the title if it's not for missed cards? A log for attempted grabs would be nice for debugging.

From the timestamps in my log it grabs cards about every hour.

NoMeansNowastaken commented 1 year ago

Cards are assumed as missed if it fails to grab it, so it if finds a card and doesn't manage to get it for any reason, it is assumed missed. I want to update soon but I have a lot of other stuff going on right now.