-1

I'm trying to sync my Discord bot's commands using the bot.tree.sync() method, but I'm getting a CommandSyncFailure error with the following message:

@bot.event
async def on_ready():
    print(f'Logged in as {bot.user}')
    await bot.tree.sync()
    scheduler.start()
    print('START SUCCESS')


discord.app_commands.errors.CommandSyncFailure: Failed to upload commands to Discord (HTTP status 400, error code 50035)
In command 'hairscan' defined in function 'hairscan'
  description: Must be 100 or fewer in length.

I've checked my code and am unsure what's causing the issue. The description of my hairscan command is quite long, but I'm unsure how to shorten it without losing important information.

Here's the relevant code:

@bot.hybrid_command(name='hairscan', description='This function takes in four images, one for each side of the face and scalp, and generates a report based on the hair condition.')
async def hairscan(ctx: commands.Context, straight: discord.Attachment, top: discord.Attachment, left: discord.Attachment, right: discord.Attachment):
    # ... rest of the function remains the same ...

How can I fix this issue and sync my commands with Discord?

Edit: I've tried shortening the description, but I'm unsure what the best approach is. Should I use a shorter description and provide more information in the command's help text? Or is there a better way to handle this?

1
  • I mean the length of the description is 128 characters so just shorten in? It's really not a suitable question for SO tbh. Commented 20 hours ago

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.