Conner-Anderson / discord-hvz

A Discord bot that helps manage a Humans vs. Zombies game. Built for the LeTourneau University game, but packaged up with documentation for outside use.
https://conner-anderson.github.io/discord-hvz-docs/latest/
MIT License
4 stars 0 forks source link

Error thrown on startup #55

Closed Conner-Anderson closed 1 year ago

Conner-Anderson commented 2 years ago

Sometimes when the bot launches, this error is thrown:

Ignoring exception in on_member_update Traceback (most recent call last): File "C:\Users\conne\Dev\discord-hvz-live\venv\lib\site-packages\discord\client.py", line 352, in _run_event await coro(*args, **kwargs) File "C:\Users\conne\Dev\discord-hvz-live\discord_hvz.py", line 106, in inner my_guild_id = self.guild.id AttributeError: 'NoneType' object has no attribute 'id'

This is probably because another event is firing before the on_ready event, and the check_event decorator needs information that is set during on_ready to work. This bug causes no issues besides the annoying log I believe.

Conner-Anderson commented 1 year ago

A pycord update fixed this.