mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Fix them again
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user