Wikipedia Work Again

This commit is contained in:
Daniel Odendahl Jr
2017-03-23 04:03:16 +00:00
parent 602e632cf9
commit a4e9859f2c
+1
View File
@@ -19,6 +19,7 @@ module.exports = class WikipediaCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
let thingToSearch = encodeURI(message.content.split(" ").slice(1).join(" "));
thingToSearch = thingToSearch.split(")").join("%29");
request
.get(`https://en.wikipedia.org/w/api.php?action=query&prop=extracts&format=json&titles=${thingToSearch}&exintro=&explaintext=&redirects=&formatversion=2`)
.then(function(response) {