fix(DM error): fix AttributeError: 'NoneType' on sending DM to the bot

This commit is contained in:
Romain J 2019-10-26 23:26:00 +02:00
commit ba1122c07b
4 changed files with 8 additions and 5 deletions

3
bot.py
View file

@ -102,7 +102,8 @@ class TuxBot(commands.AutoShardedBot):
async def on_message(self, message: discord.message):
if message.author.bot \
or message.author.id in self.blacklist \
or message.guild.id in self.blacklist:
or (message.guild is not None
and message.guild.id in self.blacklist):
return
await self.process_commands(message)

View file

@ -1,6 +1,7 @@
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, BigInteger, JSON, ForeignKey, Boolean
from sqlalchemy.orm import relationship
from werkzeug.security import generate_password_hash, check_password_hash
Base = declarative_base()

1
output.txt Normal file

File diff suppressed because one or more lines are too long

View file

@ -1,11 +1,11 @@
{
"280805240977227776": [
"b!"
"b!!"
],
"303633056944881686": [
"b!"
"b!!"
],
"336642139381301249": [
"b!"
"b!!"
]
}
}