Skip to content

Commit e7aaeaf

Browse files
Limit autocomplete choices to 25
1 parent 5f6355d commit e7aaeaf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

discord/commands/commands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,11 +542,11 @@ async def invoke_autocomplete_callback(self, interaction: Interaction):
542542
result = await option.autocomplete(ctx)
543543
else:
544544
result = option.autocomplete(ctx)
545-
545+
546546
choices = [
547547
o if isinstance(o, OptionChoice) else OptionChoice(o)
548548
for o in result
549-
]
549+
][:25]
550550
return await interaction.response.send_autocomplete_result(choices=choices)
551551

552552

0 commit comments

Comments
 (0)