File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -324,13 +324,21 @@ async def create_symbol_embed(self, symbol_name: str) -> discord.Embed | None:
324324 return embed
325325
326326 async def create_compact_doc_message (self , symbols : list [str ]) -> str :
327- """Create a markdown bullet list of links to docs for the given list of symbols."""
327+ """
328+ Create a markdown bullet list of links to docs for the given list of symbols.
329+
330+ Link to at most 10 items, ignoring the rest.
331+ """
328332 items = await self ._get_symbols_items (symbols )
329333 content = ""
334+ link_count = 0
330335 for symbol_name , doc_item in items :
336+ if link_count >= 10 :
337+ break
331338 if doc_item is None :
332339 log .debug (f"{ symbol_name = } does not exist." )
333340 else :
341+ link_count += 1
334342 content += f"- [{ discord .utils .escape_markdown (symbol_name )} ](<{ doc_item .url } #{ doc_item .symbol_id } >)\n "
335343
336344 return content
You can’t perform that action at this time.
0 commit comments