[NoFlippedTables] Guild check first
This commit is contained in:
@@ -83,10 +83,10 @@ class NoFlippedTables(commands.Cog):
|
|||||||
async def on_message(self, message):
|
async def on_message(self, message):
|
||||||
channel = message.channel
|
channel = message.channel
|
||||||
user = message.author
|
user = message.author
|
||||||
if not channel.permissions_for(message.guild.me).send_messages:
|
|
||||||
return
|
|
||||||
if not message.guild:
|
if not message.guild:
|
||||||
return
|
return
|
||||||
|
if not channel.permissions_for(message.guild.me).send_messages:
|
||||||
|
return
|
||||||
if hasattr(user, "bot") and user.bot is True:
|
if hasattr(user, "bot") and user.bot is True:
|
||||||
return
|
return
|
||||||
toggle = await self.config.guild(message.guild).TOGGLE()
|
toggle = await self.config.guild(message.guild).TOGGLE()
|
||||||
|
|||||||
Reference in New Issue
Block a user