title: How could I create commands using methods from a class in discord.py rewrite?
body: <p>How could I add commands using a class like this:</p>
  <pre><code>class BotCreater:
      from discord.ext import commands
  
      def __init__(self, token, bot_type):
          self.token = token
          self.bot = self.commands.Bot(command_prefix=&quot;!&quot;)
          self.bot.remove_command('help')
  
      def command(self):
          async def command(ctx):
              await ctx.send(&quot;Hello&quot;)
  
      def run(self):
          self.bot.run(self.token)
  </code></pre>
  <p>So I could just call <code>bot_thing = BotCreater(token)</code>, <code>bot_thing.command()</code>, and <code>bot_thing.run()</code>, and then it would run the bot with that command.</p>