#Slash commands doesnt work

1 messages · Page 1 of 1 (latest)

crystal ravine
#

what do you mean by doesnt work? code errors? what error? code doesnt error and doesnt run? slash commands throw error in discord? slash commands dont show up? bot doesnt run and errors? details

sick gulch
#

No errors -

The command appears available when typed but does not respond with anything. All my slash commands I have don't send messages.

If I make a print at the beginning of the command it shows that the function is executed

crystal ravine
#

so the command runs but does not send a response to the discord channel?

sick gulch
#

Well sorry, now the slash commands are loaded (on_ready) but if i call the command it doesn't even do print("start")

@bot.slash_command(description="Get the hex code of a color")
@nextcord.ext.application_checks.check(check_slash_cmds)
async def hexcolor(
    interaction: Interaction,
    color = SlashOption(name="color", description="Choose a color", required=True),
):
    print("start")

    c = return_colors(color)
    if c != "Not a registered color":
        return await interaction.response.send_message(f"The hexadecimal code for `{color}` is: **#{c:06x}**.")
    await interaction.response.send_message(f"Could not find the color `{color}`.")
    
    print("end")