mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 18:27:59 -05:00
Allow pre_invoke to be used by 3rd party cogs safely. (#3369)
* Okay, so there's a lot in this diff * fix docstrings * meh * fix misleading var name * meh... * useful typehints * Apply suggestions from code review Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com> * dep warn in locations suitable * Fix this... * Apply suggestions from code review Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com> Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
@@ -13,14 +13,6 @@ def init_global_checks(bot):
|
||||
"""
|
||||
return ctx.channel.permissions_for(ctx.me).send_messages
|
||||
|
||||
@bot.check_once
|
||||
def actually_up(ctx) -> bool:
|
||||
"""
|
||||
Uptime is set during the initial startup process.
|
||||
If this hasn't been set, we should assume the bot isn't ready yet.
|
||||
"""
|
||||
return ctx.bot.uptime is not None
|
||||
|
||||
@bot.check_once
|
||||
async def whiteblacklist_checks(ctx) -> bool:
|
||||
return await ctx.bot.allowed_by_whitelist_blacklist(ctx.author)
|
||||
|
||||
Reference in New Issue
Block a user