Dhravya / Spacebot

An open-source, multipurpose, configurable discord bot that does it all (that's the plan, at least)
https://dsc.gg/spacebt
MIT License
41 stars 11 forks source link

Fix vote reminder #33

Closed Dhravya closed 2 years ago

Dhravya commented 2 years ago

Vote reminder currently is giving this error:

2|main  |   File "/root/PythonProjects/spacebot/src/cogs/backgroundtasks.py", line 317, in send_vote_reminder
2|main  |     last_voted_datetime = datetime.strptime(
2|main  |   File "/usr/lib/python3.8/_strptime.py", line 568, in _strptime_datetime
2|main  |     tt, fraction, gmtoff_fraction = _strptime(data_string, format)
2|main  |   File "/usr/lib/python3.8/_strptime.py", line 349, in _strptime
2|main  |     raise ValueError("time data %r does not match format %r" %
2|main  | ValueError: time data '2021-12-10 09:07:45.594144' does not match format '%Y-%m-%dT%H:%M:%S.%f'

Now, I don't see any problem with the syntax, is it a version issue? Here is the snippet thats causes the errror: https://github.com/Dhravya/Spacebot/blob/d8632280984ef3ae854653c16a3f0147de1a64cf/src/cogs/backgroundtasks.py#L307-L330

Dhravya commented 2 years ago

I've tried to fix this in the latest commit lets see if that works