aboutsummaryrefslogtreecommitdiffstats
path: root/bot
diff options
context:
space:
mode:
authorGravatar Anubhav <[email protected]>2020-09-21 11:59:55 +0530
committerGravatar GitHub <[email protected]>2020-09-21 11:59:55 +0530
commita4e949123816150f86c8dbf8a36a4a67741a4f0c (patch)
treee5d22e863916f5b50fb05f9a06c0a5fddd2270de /bot
parentmade code more readable (diff)
changed f_wiki_urls -> f_wiki_url
Co-authored-by: Thomas Petersson <[email protected]>
Diffstat (limited to 'bot')
-rw-r--r--bot/exts/evergreen/wikipedia.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/bot/exts/evergreen/wikipedia.py b/bot/exts/evergreen/wikipedia.py
index e18c0b79..c565a404 100644
--- a/bot/exts/evergreen/wikipedia.py
+++ b/bot/exts/evergreen/wikipedia.py
@@ -22,10 +22,9 @@ class WikipediaCog(commands.Cog):
self.http_session = bot.http_session
@staticmethod
- def formatted_wiki_urls(index: int, titles: str) -> List[str]:
- """Making formatted wikipedia links list."""
- titles = f'`{index}` [{titles}]({WIKIPEDIA_URL.format(title=titles.replace(" ", "_"))})'
- return titles
+ def formatted_wiki_url(index: int, titles: str) -> str:
+ """Making formatted wikipedia link.."""
+ return f'`{index}` [{title}]({WIKIPEDIA_URL.format(title=title.replace(" ", "_"))})'
async def search_wikipedia(self, search_term: str) -> List[str]:
"""Search wikipedia and return the first page found."""