samedi 3 septembre 2022

Roll the dice command not working in discord.py

@client.slash_command()
async def rollthedice(ctx, number: str):
    nu: str = number
    r = random.randint(1, nu)
    await ctx.respond(r)

So i get this error and i dont understand:

Command raised an exception: TypeError: can only concatenate str (not "int") to str

I dont want a code that works but an explanation/




Aucun commentaire:

Enregistrer un commentaire