🐛 Fixed bug with fandom-py

This commit is contained in:
NikolajDanger
2021-04-11 15:20:07 +02:00
parent f7c903852c
commit 7b636df304
2 changed files with 5 additions and 5 deletions

View File

@ -146,7 +146,7 @@ class Other():
searchResults = fandom.search(search)
if len(searchResults) > 0:
foundPage = True
searchResult = searchResults[0].replace(",","%2C")
searchResult = searchResults[0]
else:
self.bot.log("Couldn't find the page")
await ctx.send("Couldn't find page (error code 1002)")
@ -156,8 +156,8 @@ class Other():
searchResult = fandom.random()
if foundPage:
self.bot.log("Found page \""+searchResult+"\"")
page = fandom.page(searchResult)
self.bot.log(f"Found page \"{searchResult[0]}\"")
page = fandom.page(pageid = searchResult[1])
content = page.summary
images = page.images