This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
joined_at is randomly None #36
Open
Description
Noted in my bot today:
Traceback (most recent call last):
File "/home/eyes/.local/share/virtualenvs/Jokusoramame-25ROq1gv/lib/python3.6/site-packages/curious/commands/context.py", line 278, in invoke
return await matched_command(self, *converted_args, **converted_kwargs)
File "/home/eyes/bots/Jokusoramame/jokusoramame/plugins/autoprune.py", line 177, in report
activity_data = await self.get_member_activity_data(ctx.guild)
File "/home/eyes/bots/Jokusoramame/jokusoramame/plugins/autoprune.py", line 137, in get_member_activity_data
if (now - member.joined_at).days < 3:
TypeError: unsupported operand type(s) for -: 'datetime.datetime' and 'NoneType'
Maybe it's a bug in the code, in which case this is here so I'll remember it.
If not, considering making some sort of "consistency checker" background task in 0.8 that when it finds something that shouldn't happen (member having None joined_at, no owner_id, etc) just requests a rechunk (or downloads the data over HTTP).
Metadata
Metadata
Assignees
Labels
No labels