コード例 #1
0
ファイル: docs.py プロジェクト: Lupus590/FAQBot-CC
 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
ファイル: docs.py プロジェクト: Lupus590/FAQBot-CC
 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)