mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 06:42:51 +02:00
Wikipedia Fixes (Again)
This commit is contained in:
@@ -29,12 +29,12 @@ class WikipediaCommand extends commando.Command {
|
|||||||
request(options).then(function (response) {
|
request(options).then(function (response) {
|
||||||
let description = response.query.pages[0].extract;
|
let description = response.query.pages[0].extract;
|
||||||
let name = response.query.pages[0].title;
|
let name = response.query.pages[0].title;
|
||||||
description = description.substr(0, 1900);
|
|
||||||
description = description.replace(/\n/, "\n\n");
|
|
||||||
wikied = wikied.replace(")", "%29");
|
wikied = wikied.replace(")", "%29");
|
||||||
if(description === undefined) {
|
if(description === undefined) {
|
||||||
message.channel.sendMessage(":x: Error! Entry Not Found!");
|
message.channel.sendMessage(":x: Error! Entry Not Found!");
|
||||||
} else {
|
} else {
|
||||||
|
description = description.substr(0, 1900);
|
||||||
|
description = description.replace(/\n/, "\n\n");
|
||||||
if(description.length > 1900) {
|
if(description.length > 1900) {
|
||||||
const embed = new Discord.RichEmbed()
|
const embed = new Discord.RichEmbed()
|
||||||
.setColor(0xE7E7E7)
|
.setColor(0xE7E7E7)
|
||||||
|
|||||||
Reference in New Issue
Block a user