title: TypeError: 'Collection' object is not callableon mongodb
body: <p>I have been trying to create a warn system using mongodb, and I am having a hard time setting up the schema/ section to upload each time a user gets warned. the error I get is what is below. I have looked around all documentation I can, I just do not understand.</p>
  <pre><code>Traceback (most recent call last):
    File &quot;C:\Users\dargo\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\ext\commands\core.py&quot;, line 85, in wrapped
      ret = await coro(*args, **kwargs)
    File &quot;C:\Users\dargo\PycharmProjects\MaxCodezBot\cogs\warns.py&quot;, line 53, in warn
      await self.client.warns.insert(warn)
    File &quot;C:\Users\dargo\PycharmProjects\MaxCodezBot\utils\mongo.py&quot;, line 85, in insert
      await self.db.insert_one(dict)
    File &quot;C:\Users\dargo\AppData\Local\Programs\Python\Python39\lib\site-packages\pymongo\collection.py&quot;, line 3440, in __call__
      raise TypeError(&quot;'Collection' object is not callable. If you &quot;
  TypeError: 'Collection' object is not callable. If you meant to call the 'insert_one' method on a 'Database' object it is failing because no such method exists.
  </code></pre>
  <p>with the code</p>
  <pre><code>@commands.command()
      @commands.guild_only()
      # @commands.has_guild_permissions(kick_members=True)
      async def warn(self, ctx, user: discord.User, *, reason=None):
          if user is None:
              await ctx.send(&quot;You have not provided a user!&quot;)
              return
  
          if user is user.bot:
              await ctx.send(f&quot;&lt;@{ctx.author.id}, you cannot warn a bot!&quot;)
              return
  
          if user.id == ctx.author.id:
              embed = discord.Embed(description=f&quot;&lt;@{ctx.author.id}&gt;, you are not allowed to warn yourself!&quot;)
  
              embed.set_author(name=ctx.author.display_name, icon_url=ctx.author.avatar_url)
              embed.set_footer(text=f&quot;{ctx.message.guild.name} Custom Designed Bot&quot;)
              embed.timestamp = ctx.message.created_at
  
              await ctx.send(embed=embed)
              return
  
          author_id = ctx.author.id
          guild = ctx.message.guild.id
          first_warning = False
          warn_id = 0
          reason = reason or None
  
          warn = {
              &quot;_id&quot;: ctx.message.guild.id,
              &quot;user&quot;: user.id,
              &quot;warn&quot;: [{
                  &quot;PunishType&quot;: 'warn',
                  &quot;Moderator&quot;: ctx.message.author.id,
                  &quot;Reason&quot;: reason,
              }],
          }
          await self.client.warns.insert(warn)
  </code></pre>