Jan200101 / Appu-cogs

GNU General Public License v3.0
2 stars 2 forks source link

In DM's Anything in terminal crashes #6

Closed gidoBOSSftw5731 closed 6 years ago

gidoBOSSftw5731 commented 6 years ago

If I am not in a server (like a DM) it errors:

Ignoring exception in message
Traceback (most recent call last):
  File "/home/gido5731/.local/lib/python3.5/site-packages/discord/client.py", line 223, in _run_event
    yield from coro(*args, **kwargs)
  File "/home/gido5731/Discord-Selfbot/cogs/terminal.py", line 242, in on_message
    if (message.channel.id in self.sessions and self.enabled and message.author.id == message.guild.me.id): # DO NOT DELETE
AttributeError: 'NoneType' object has no attribute 'me'

after each message.

appu1232 commented 6 years ago

Should be fixed with this commit