mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Core, Alias, Customcom] Moved bot checks to user_allowed (#454)
More selfbot friendliness for modded Reds
This commit is contained in:
parent
36216a4058
commit
70afff5b5f
@ -108,8 +108,7 @@ class Alias:
|
|||||||
await self.bot.say("There are no aliases on this server.")
|
await self.bot.say("There are no aliases on this server.")
|
||||||
|
|
||||||
async def check_aliases(self, message):
|
async def check_aliases(self, message):
|
||||||
if message.author == self.bot.user or \
|
if len(message.content) < 2 or message.channel.is_private:
|
||||||
len(message.content) < 2 or message.channel.is_private:
|
|
||||||
return
|
return
|
||||||
|
|
||||||
msg = message.content
|
msg = message.content
|
||||||
|
|||||||
@ -106,8 +106,7 @@ class CustomCommands:
|
|||||||
await self.bot.say("There are no custom commands in this server. Use addcom [command] [text]")
|
await self.bot.say("There are no custom commands in this server. Use addcom [command] [text]")
|
||||||
|
|
||||||
async def checkCC(self, message):
|
async def checkCC(self, message):
|
||||||
if message.author == self.bot.user or\
|
if len(message.content) < 2 or message.channel.is_private:
|
||||||
len(message.content) < 2 or message.channel.is_private:
|
|
||||||
return
|
return
|
||||||
|
|
||||||
msg = message.content
|
msg = message.content
|
||||||
|
|||||||
6
red.py
6
red.py
@ -141,11 +141,11 @@ def user_allowed(message):
|
|||||||
|
|
||||||
author = message.author
|
author = message.author
|
||||||
|
|
||||||
mod = bot.get_cog('Mod')
|
if author.bot or author == bot.user:
|
||||||
|
|
||||||
if author.bot:
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
mod = bot.get_cog('Mod')
|
||||||
|
|
||||||
if mod is not None:
|
if mod is not None:
|
||||||
if settings.owner == author.id:
|
if settings.owner == author.id:
|
||||||
return True
|
return True
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user