From 06fa385294f8d11e4afaa9c91f44d231dc187853 Mon Sep 17 00:00:00 2001 From: dnutiu Date: Mon, 29 Jan 2024 22:16:11 +0200 Subject: [PATCH] rename get_wiki_page_url to get_page_link --- src/bot/discord/commands/pathfinder_wiki.py | 2 +- src/knowledge/pathfinder_wiki.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bot/discord/commands/pathfinder_wiki.py b/src/bot/discord/commands/pathfinder_wiki.py index 9483bd5..705e646 100644 --- a/src/bot/discord/commands/pathfinder_wiki.py +++ b/src/bot/discord/commands/pathfinder_wiki.py @@ -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}") diff --git a/src/knowledge/pathfinder_wiki.py b/src/knowledge/pathfinder_wiki.py index 633cfeb..0f1a5db 100644 --- a/src/knowledge/pathfinder_wiki.py +++ b/src/knowledge/pathfinder_wiki.py @@ -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())