Search code examples
pythonembeddiscord.py

Discord.py More than 1 Int needed


Im trying to make a Spam command for my Discord Bot but i need more then 1 int so i cann set title description and spam amount... Would be nice if you cann help

@bot.command()
    async def spam(ctx, amount: int, title: int, *, message):

Error : Converting to "int" failed for parameter "title".


Solution

  • The problem is, you set the title to Integer (Only accepts number), if you wan't it to be anything, just do this

    @bot.command()
    async def spam(ctx, amount: int, title: str, *, message):
    

    You probably need the title of a Embed, if you don't use embed, do this

    @bot.command()
       async def spam(ctx, amount: int, *, message):
    

    Your code is trying to convert the title from String to Integer (That will raise a error).