[Mod] Move ignored guilds and channels to core (#3472)

* Move ignored guilds and channels to core
Add caching for ignored guilds and channels
Add caching for whitelist and blacklist
Fix #3220
Add consume-rest for whitelist and blacklist commands to add multiple users or roles in one command

* Add ability to ignore channel categories

* black

* moveignorechannels should be owner only and cleanup changes

* add changelog entries

* address Feedback
This commit is contained in:
TrustyJAID
2020-02-14 23:21:09 -07:00
committed by GitHub
parent 78192dc1af
commit 74a3eba08f
8 changed files with 457 additions and 238 deletions

View File

@@ -7,7 +7,7 @@ def init_global_checks(bot):
def minimum_bot_perms(ctx) -> bool:
"""
Too many 403, 401, and 429 Errors can cause bots to get global'd
It's reasonable to assume the below as a minimum amount of perms for
commands.
"""
@@ -17,6 +17,11 @@ def init_global_checks(bot):
async def whiteblacklist_checks(ctx) -> bool:
return await ctx.bot.allowed_by_whitelist_blacklist(ctx.author)
@bot.check_once
async def ignore_checks(ctx) -> bool:
"""Check the channel or server is not ignored"""
return await ctx.bot.ignored_channel_or_guild(ctx)
@bot.check_once
def bots(ctx) -> bool:
"""Check the user is not another bot."""