Q: Command raised an exception: TypeError: send() takes from 1 to 2 positional arguments but 3 were given i keep getting Command raised an exception: TypeError: send() takes from 1 to 2 positional arguments but 3 were given
how i fix dis
limit = 500
@bot.command()
async def rule34(ctx, *, tags:str):
        """Searches rule34.xxx for the specified tagged images"""
        await ctx.channel.trigger_typing()
        tags = strip_global_mentions(tags, ctx)
        try:
            data = requests.get("http://rule34.xxx/index.php?page=dapi&s=post&q=index&json=1&limit={}&tags={}".format(limit, tags), headers=header).json()
        except json.JSONDecodeError:
            await ctx.send("nothing found chief")
            return

        count = len(data)
        if count == 0:
            await ctx.send("nothing found cheif")
            return
        image_count = 4
        if count < 4:
            image_count = count
        images = []
        for i in range(image_count):
            image = data[random.randint(0, count)]
            images.append("http://img.rule34.xxx/images/{}/{}".format(image["directory"], image["image"]))
        await ctx.send("nsfw.results", ctx).format(image_count, count, tags, "\n".join(images))


A: From what I can gather you are just trying to send a nicely formatted message including all of the variables, so an example solution of this might be:
await ctx.send("nsfw.results: {0}/{1}\nTags: {2}\n{3}".format(image_count, count, tags, "\n".join(images)))

Problems fixed compared to the original last line:

*

*Removed ctx parameter passed to the send function

*Put .format on string instead of .send function

*changed the nsfw.results string to function like a string which can be formatted

Useful Links:
Python string.format() documentation
Dedicated Pyformat site
