🐛 Fixed bug with fandom-py
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user