title: discord.py-rewrite - How to use custom checks in cogs?
body: <p>So, on my <code>bot.py</code> main file, I have:</p>
  
  <pre><code>class Bot(commands.Bot):
  
      # BOT ATTRIBUTES
  
      class default_cooldown:
          maxcommands = ...
          seconds = ...
          mode = ...
  
      class my_exception(commmands.CommandError): pass
  
      def my_check(self):
          def predicate(ctx):
              if ctx.author in a_list: return True
              raise self.my_exception
  
  bot = Bot(...)
  </code></pre>
  
  <p>Now I also have a cog file where I want to use the <code>Bot().my_check()</code> check and my <code>Bot().default_cooldown()</code> class:</p>
  
  <pre><code>class Cog(commands.Cog):
  
      def __init__(self, bot):
          self.bot = bot
  
      @commands.command()
      @self.bot.my_check()
      @commands.cooldown(self.bot.default_cooldown().maxcommands, self.bot.default_cooldown().seconds, self.bot.default_cooldown().mode)
      async def a_command(self, ctx):
          pass
  </code></pre>
  
  <p>But I get an error, saying that <code>self</code> is not defined on my check and cooldown. Can anyone please help me fix this problem?</p>