Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add minmax length #1463

Merged
merged 18 commits into from
Jul 4, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix slash_autocomplete to not error
The command description docstring was to long (over 100 characters).
  • Loading branch information
Icebluewolf authored Mar 8, 2022
commit 91572a1440aecf0eb91b2249d960a9eba3f4ebec
4 changes: 3 additions & 1 deletion examples/app_commands/slash_autocomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ async def autocomplete_example(
color: Option(str, "Pick a color!", autocomplete=get_colors),
animal: Option(str, "Pick an animal!", autocomplete=get_animals),
):
"""This demonstrates using the ctx.options parameter to create slash command options that are dependent on the values entered for other options."""
"""Demonstrates using ctx.options to create options that are dependent on the values of other options.
For the `color` option, a callback is passed, where additional logic can be added to determine which values are returned.
For the `animal` option, the callback uses the input from the color option to return an iterable of animals"""
await ctx.respond(f"You picked {color} for the color, which allowed you to choose {animal} for the animal.")


Expand Down