Hi, sorry for the bother but I seem to be getting an error when I try to use the Option class for my commands, I get an error whenever I use the required parameter. Here's the code that I wrote that has the issue:
@bot.command(description="Launches the Gmod Server if it's not running")
async def launchgmodserver(ctx,
maxplayers: discord.SlashCommandOptionType.integer,
mapId: discord.Option(input_type = str, name = "map", channel_type = None, required = False),
workshopid: discord.SlashCommandOptionType.integer):
await ctx.respond("I still don't work ya numpty")
pass
and when I run it with the current code. It gives me this error:
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In 0.options.2: Required options must be placed before non-required options
But, when I look at the documentation of the Option class, I don't see what Required options I'm missing. Otherwise, when I run the code without the required = False, the program runs without a hitch. I'm not sure what I'm doing wrong but I would be grateful for any help