Fix them again

This commit is contained in:
Daniel Odendahl Jr
2017-08-06 15:02:24 +00:00
parent 7c77589c35
commit 9e2b3e65ea
8 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ module.exports = class AnimeCommand extends Command {
.get(`https://${animelistLogin}@myanimelist.net/api/anime/search.xml`)
.query({ q: query });
const { anime } = await xml.parseStringAsync(text);
const synopsis = cleanXML(anime.entry[0].synopsis[0].substr(0, 2048));
const synopsis = cleanXML(anime.entry[0].synopsis[0].substr(0, 2047));
const embed = new MessageEmbed()
.setColor(0x2D54A2)
.setAuthor('My Anime List', 'https://i.imgur.com/R4bmNFz.png')
+1 -1
View File
@@ -40,7 +40,7 @@ module.exports = class BulbapediaCommand extends Command {
.setColor(0x3E7614)
.setTitle(body.query.pages[0].title)
.setAuthor('Bulbapedia', 'https://i.imgur.com/09eYo5T.png')
.setDescription(body.query.pages[0].extract.substr(0, 2048).replace(/[\n]/g, '\n\n'));
.setDescription(body.query.pages[0].extract.substr(0, 2047).replace(/[\n]/g, '\n\n'));
return msg.embed(embed);
}
};
+1 -1
View File
@@ -31,7 +31,7 @@ module.exports = class MangaCommand extends Command {
.get(`https://${animelistLogin}@myanimelist.net/api/manga/search.xml`)
.query({ q: query });
const { manga } = await xml.parseStringAsync(text);
const synopsis = cleanXML(manga.entry[0].synopsis[0].substr(0, 2048));
const synopsis = cleanXML(manga.entry[0].synopsis[0].substr(0, 2047));
const embed = new MessageEmbed()
.setColor(0x2D54A2)
.setAuthor('My Anime List', 'https://i.imgur.com/R4bmNFz.png')
+1 -1
View File
@@ -31,7 +31,7 @@ module.exports = class UrbanCommand extends Command {
.setAuthor('Urban Dictionary', 'https://i.imgur.com/fzFuuL7.png')
.setURL(body.list[0].permalink)
.setTitle(body.list[0].word)
.setDescription(body.list[0].definition.substr(0, 2048))
.setDescription(body.list[0].definition.substr(0, 2047))
.addField(' Example',
body.list[0].example.substr(0, 1024) || 'None');
return msg.embed(embed);
+1 -1
View File
@@ -40,7 +40,7 @@ module.exports = class VocaloidCommand extends Command {
.setAuthor('VocaDB', 'https://i.imgur.com/9Tx9UIc.jpg')
.setTitle(body.items[0].name)
.setURL(`http://vocadb.net/S/${body.items[0].id}`)
.setDescription(body.items[0].lyrics[0] ? body.items[0].lyrics[0].value.substr(0, 2048) : 'No lyrics available.')
.setDescription(body.items[0].lyrics[0] ? body.items[0].lyrics[0].value.substr(0, 2047) : 'No lyrics available.')
.setThumbnail(body.items[0].thumbUrl)
.addField(' Artist',
body.items[0].artistString)
+1 -1
View File
@@ -37,7 +37,7 @@ module.exports = class WattpadCommand extends Command {
.setAuthor('Wattpad', 'https://i.imgur.com/Rw9vRQB.png')
.setURL(body.stories[0].url)
.setTitle(body.stories[0].title)
.setDescription(body.stories[0].description.substr(0, 2048))
.setDescription(body.stories[0].description.substr(0, 2047))
.setThumbnail(body.stories[0].cover)
.addField(' Created On',
moment(body.stories[0].createDate).format('MMMM Do YYYY'), true)
+1 -1
View File
@@ -45,7 +45,7 @@ module.exports = class WikiaCommand extends Command {
.setTitle(body.sections[0].title)
.setURL(search.body.items[0].url)
.setAuthor('Wikia', 'https://i.imgur.com/WzXWJka.png')
.setDescription(body.sections[0].content.map(i => i.text).join('\n\n').substr(0, 2048))
.setDescription(body.sections[0].content.map(i => i.text).join('\n\n').substr(0, 2047))
.setThumbnail(body.sections[0].images[0] ? body.sections[0].images[0].src : null);
return msg.embed(embed);
} catch (err) {
+1 -1
View File
@@ -39,7 +39,7 @@ module.exports = class WikipediaCommand extends Command {
.setColor(0xE7E7E7)
.setTitle(body.query.pages[0].title)
.setAuthor('Wikipedia', 'https://i.imgur.com/a4eeEhh.png')
.setDescription(body.query.pages[0].extract.substr(0, 2048).replace(/[\n]/g, '\n\n'));
.setDescription(body.query.pages[0].extract.substr(0, 2047).replace(/[\n]/g, '\n\n'));
return msg.embed(embed);
}
};