#๐ Add description
27 messages ยท Page 1 of 1 (latest)
@amber bronze
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Are you using discord.py?
If you're using @discord.app_commands.command, there's a description parameter you can pass
yeah but im like really new to python so idk what to do
@bot.slash_command(name='getrole', description='Enter your license key to receive your customer role.')
async def getrole(interaction: discord.Interaction, key: str):
await interaction.response.defer(ephemeral=True)
is it in that?
maybe, though @bot.slash_command isn't a function in discord.py so i'm not sure where that's from
do u wanna see my entire code
Did you try what you sent, because it looks like it could be right.
Are you sure you're just using discord.py and not some other library?
it works on this part but on the key part it says No description provided
yes its discord.py
discord.py and os, json, time, colorama, and datetime
i want it to be like this
not like this
ooh, my bad, I understand now
@bot.slash_command(name='getrole', description='Enter your license key to receive your customer role.')
async def getrole(
interaction: discord.Interaction,
key: discord.Option(str, description="Put description here")
):
await interaction.response.defer(ephemeral=True)
I think that should work
let me try
btw I think you're using pycord not discord.py, you might have both installed accidentally or something. I was looking at https://guide.pycord.dev/interactions/application-commands/slash-commands/#options--option-types and https://docs.pycord.dev/en/stable/api/application_commands.html#discord.Option
oh yeah u r right its pycord sorry i didnt make the code so im not really sure what it is
the dev said to install pycord
it still says no description provided
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.
๐ Add description