You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
animal: Option(str, "Pick an animal!", autocomplete=get_animals),
130
137
):
131
138
"""This demonstrates using the ctx.options parameter to to create slash command options that are dependent on the values entered for other options."""
132
-
awaitctx.respond(f"You picked {color} for the color, which allowed you to choose {animal} for the animal.")
139
+
awaitctx.respond(
140
+
f"You picked {color} for the color, which allowed you to choose {animal} for the animal."
141
+
)
133
142
134
143
135
144
@bot.slash_command(name="ac_basic_example")
136
145
asyncdefautocomplete_basic_example(
137
146
ctx: discord.ApplicationContext,
138
-
color: Option(str, "Pick a color from this big list", autocomplete=discord.utils.basic_autocomplete(color_searcher)), # Demonstrates passing a callback to discord.utils.basic_autocomplete
139
-
animal: Option(str, "Pick an animal from this small list", autocomplete=discord.utils.basic_autocomplete(["snail", "python", "cricket", "orca"])), # Demonstrates passing a static iterable discord.utils.basic_autocomplete
0 commit comments