mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-18 21:40:49 +02:00
Wikipedia Work Again
This commit is contained in:
@@ -19,6 +19,7 @@ module.exports = class WikipediaCommand extends commando.Command {
|
|||||||
}
|
}
|
||||||
console.log(`[Command] ${message.content}`);
|
console.log(`[Command] ${message.content}`);
|
||||||
let thingToSearch = encodeURI(message.content.split(" ").slice(1).join(" "));
|
let thingToSearch = encodeURI(message.content.split(" ").slice(1).join(" "));
|
||||||
|
thingToSearch = thingToSearch.split(")").join("%29");
|
||||||
request
|
request
|
||||||
.get(`https://en.wikipedia.org/w/api.php?action=query&prop=extracts&format=json&titles=${thingToSearch}&exintro=&explaintext=&redirects=&formatversion=2`)
|
.get(`https://en.wikipedia.org/w/api.php?action=query&prop=extracts&format=json&titles=${thingToSearch}&exintro=&explaintext=&redirects=&formatversion=2`)
|
||||||
.then(function(response) {
|
.then(function(response) {
|
||||||
|
|||||||
Reference in New Issue
Block a user