Random error not from bot code AttributeError: 'User' object has no attribute 'joined_at'
See original GitHub issueSummary
My bot have issue AttributeError: 'User' object has no attribute 'joined_at'
however it doesn’t seems issue from my code itself.
Reproduction Steps
My bot staying for some time, after that randomly crashes
Expected Results
Nothing
Actual Results
Traceback (most recent call last):
File "C:\Python\Python37\lib\site-packages\discord\message.py", line 403, in _handle_member
if author.joined_at is None:
AttributeError: 'User' object has no attribute 'joined_at'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "run.py", line 3206, in <module>
bot.run(token, bot = False)
File "C:\Python\Python37\lib\site-packages\discord\client.py", line 598, in run
return future.result()
File "C:\Python\Python37\lib\site-packages\discord\client.py", line 579, in runner
await self.start(*args, **kwargs)
File "C:\Python\Python37\lib\site-packages\discord\client.py", line 543, in start
await self.connect(reconnect=reconnect)
File "C:\Python\Python37\lib\site-packages\discord\client.py", line 457, in connect
await self._connect()
File "C:\Python\Python37\lib\site-packages\discord\client.py", line 421, in _connect
await self.ws.poll_event()
File "C:\Python\Python37\lib\site-packages\discord\gateway.py", line 469, in poll_event
await self.received_message(msg)
File "C:\Python\Python37\lib\site-packages\discord\gateway.py", line 423, in received_message
func(data)
File "C:\Python\Python37\lib\site-packages\discord\state.py", line 399, in parse_message_update
message._update(data)
File "C:\Python\Python37\lib\site-packages\discord\message.py", line 348, in _update
handler(self, value)
File "C:\Python\Python37\lib\site-packages\discord\message.py", line 406, in _handle_member
self.author = Member._from_message(message=self, data=member)
File "C:\Python\Python37\lib\site-packages\discord\member.py", line 197, in _from_message
return cls(data=data, guild=message.guild, state=message._state)
File "C:\Python\Python37\lib\site-packages\discord\member.py", line 162, in __init__
self._user = state.store_user(data['user'])
File "C:\Python\Python37\lib\site-packages\discord\state.py", line 170, in store_user
user_id = int(data['id'])
KeyError: 'id'
Checklist
- I have searched the open issues for duplicates.
- I have shown the entire traceback, if possible.
- I have removed my token from display, if visible.
System Information
python -m discord -v
- Python v3.7.2-final
- discord.py v1.2.3-final
- aiohttp v3.4.4
- websockets v6.0
- system info: Windows 10 10.0.17134
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
AttributeError: 'User' object has no attribute 'joined_at' [discord ...
joined_at is an attribute of the Member object, not User object. I think you'll need to change up your code to get a...
Read more >discord has no attribute bot | The AI Search Engine You Control
The key is to notice AttributeError is telling you that the module you have imported does not have the attribute Bot(). This indicates...
Read more >I am getting the error AttributeError: 'User' object has ... - Reddit
I am getting the error AttributeError: 'User' object has no attribute 'create_token' . create_token doesn't seem to working.
Read more >discord.py Documentation
discord.py logs errors and debug information via the logging python ... Do Not Disturb users no longer show up offline due to the...
Read more >I am having problems with on_member_join event
So i am making a discord bot with python, and I faced a problem. ... Client.get_guild(member.guild.id) print(f"{member} joined at {guild.name}.") I'm not ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
hellow how do i create a webhook using bot event upon joining a Guild (Server)?
how did u fix? i cant fix the same problem u are having