peter-obrien / roc-raids

Discord bot for Pokemon GO raid group organization
MIT License
5 stars 2 forks source link

discord.py updated for animated icons causes app crash #23

Open PJMan7 opened 5 years ago

PJMan7 commented 5 years ago

it doesnt seem like this rewrite exists anymore

python3 -m pip install -U git+https://github.com/Rapptz/discord.py@rewrite#egg=discord.py[voice]

Discord has been updated and now the bot crashes anytime anyone tries to submit a raid.

tried installing the latest Rapptz for discord.py but now it crashes differently

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\PokemonGo\organizer\bot.py", line 112, in init self.load_extension(extension) File "C:\Program Files\Python36\lib\site-packages\discord\ext\commands\bot.py", line 625, in load_extension self._load_from_module_spec(lib, name) File "C:\Program Files\Python36\lib\site-packages\discord\ext\commands\bot.py", line 584, in _load_from_module_spec raise errors.ExtensionFailed(key, e) from e discord.ext.commands.errors.ExtensionFailed: Extension 'cogs.zones' raised an error: TypeError: cogs must derive from Cog Could not find channel raid message 885570 Could not find channel raid message 853360 Could not find channel raid message 853359 Ignoring exception in on_ready Traceback (most recent call last): File "C:\Program Files\Python36\lib\site-packages\discord\client.py", line 270, in _run_event await coro(*args, **kwargs) File "C:\PokemonGo\organizer\bot.py", line 149, in on_ready await self.raids.load_from_database(self) File "C:\PokemonGo\organizer\raids.py", line 67, in load_from_database msg = await channel.get_message(rm.message) AttributeError: 'TextChannel' object has no attribute 'get_message' Ignoring exception in on_raw_reaction_add

peter-obrien commented 5 years ago

Locally it appears that when upgrading to the following version of the Discord.py library along with the changes I just delivered that the errors when creating/joining raids have stopped.

For Windows: py -3 -m pip install -U discord.py If not Windows try: python3 -m pip install -U discord.py Both commands are from here

I did notice that when logging out that I receive the following stack in my console but have been unsuccessful in fixing it thus far but it doesn't appear to be a showstopper as it's mostly just unclosed resources.

Logout command invoked. Shutting down.
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x033F8690>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x04ABB3B0>, 1786.375)]']
connector: <aiohttp.connector.TCPConnector object at 0x043AF430>