示例#1
0
 async def doc(self, ctx: commands.Context, *, search: str) -> None:
     """Searches for a function with the current name and returns its documentation."""
     await self._search_docs(SendableContext(ctx), search, lambda x: f"https://tweaked.cc/{x['url']}")
示例#2
0
 async def source(self, ctx: commands.Context, *, search: str) -> None:
     """Searches for a function with the current name, and returns a link to its source code."""
     await self._search_docs(SendableContext(ctx), search, lambda x: x["source"])
示例#3
0
文件: faq.py 项目: Lupus590/FAQBot-CC
 async def faq(self, ctx: commands.Context, *, search):
     """Retrieves FAQs related to given keyword(s)."""
     await _search(SendableContext(ctx), self.faqs, search)