mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2026-03-07 04:38:35 -05:00
Co-authored-by: Michael Oliveira <34169552+Flame442@users.noreply.github.com> Co-authored-by: Jakub Kuczys <me@jacken.men>
12 lines
422 B
Python
12 lines
422 B
Python
"""The checks in this module run on every command."""
|
|
from . import commands
|
|
|
|
|
|
def init_global_checks(bot):
|
|
@bot.check_once
|
|
async def check_message_is_eligible_as_command(ctx: commands.Context) -> bool:
|
|
if ctx.interaction is not None:
|
|
# equivalent checks are performed by `RedTree.interaction_check`
|
|
return True
|
|
return await ctx.bot.message_eligible_as_command(ctx.message)
|