rename get_wiki_page_url to get_page_link
This commit is contained in:
parent
0deaa1a248
commit
06fa385294
2 changed files with 3 additions and 3 deletions
|
@ -24,5 +24,5 @@ class PathfinderWikiCog(commands.Cog):
|
|||
inter: disnake.ApplicationCommandInteraction,
|
||||
query: str = commands.Param(autocomplete=pathfinder_wiki_lookup_autocomplete),
|
||||
):
|
||||
wiki_link = PathfinderWikiClient.get_wiki_page_url(query)
|
||||
wiki_link = PathfinderWikiClient.get_page_link(query)
|
||||
await inter.send(f"@{inter.author} here's the wiki link: {wiki_link}")
|
||||
|
|
|
@ -56,7 +56,7 @@ class PathfinderWikiClient:
|
|||
return list(map(_convert_to_page, result.get("pages", [])))
|
||||
|
||||
@staticmethod
|
||||
def get_wiki_page_url(page_key) -> str:
|
||||
def get_page_link(page_key) -> str:
|
||||
return f"https://pathfinderwiki.com/wiki/{page_key}"
|
||||
|
||||
async def close(self):
|
||||
|
@ -66,6 +66,6 @@ class PathfinderWikiClient:
|
|||
if __name__ == "__main__":
|
||||
pf = PathfinderWikiClient()
|
||||
asyncio.run(pf.search_pages("zom"))
|
||||
print(pf.get_wiki_page_url("zombie_lord"))
|
||||
print(pf.get_page_link("zombie_lord"))
|
||||
|
||||
asyncio.run(pf.close())
|
||||
|
|
Loading…
Reference in a new issue