fix(DM error): fix AttributeError: 'NoneType' on sending DM to the bot
This commit is contained in:
commit
ba1122c07b
4 changed files with 8 additions and 5 deletions
3
bot.py
3
bot.py
|
@ -102,7 +102,8 @@ class TuxBot(commands.AutoShardedBot):
|
||||||
async def on_message(self, message: discord.message):
|
async def on_message(self, message: discord.message):
|
||||||
if message.author.bot \
|
if message.author.bot \
|
||||||
or message.author.id in self.blacklist \
|
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
|
return
|
||||||
|
|
||||||
await self.process_commands(message)
|
await self.process_commands(message)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
from sqlalchemy.ext.declarative import declarative_base
|
from sqlalchemy.ext.declarative import declarative_base
|
||||||
from sqlalchemy import Column, Integer, BigInteger, JSON, ForeignKey, Boolean
|
from sqlalchemy import Column, Integer, BigInteger, JSON, ForeignKey, Boolean
|
||||||
from sqlalchemy.orm import relationship
|
from sqlalchemy.orm import relationship
|
||||||
|
from werkzeug.security import generate_password_hash, check_password_hash
|
||||||
|
|
||||||
Base = declarative_base()
|
Base = declarative_base()
|
||||||
|
|
||||||
|
|
1
output.txt
Normal file
1
output.txt
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
"280805240977227776": [
|
"280805240977227776": [
|
||||||
"b!"
|
"b!!"
|
||||||
],
|
],
|
||||||
"303633056944881686": [
|
"303633056944881686": [
|
||||||
"b!"
|
"b!!"
|
||||||
],
|
],
|
||||||
"336642139381301249": [
|
"336642139381301249": [
|
||||||
"b!"
|
"b!!"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue