Add URLs to all author embed fields

This commit is contained in:
Daniel Odendahl Jr
2018-02-26 00:09:56 +00:00
parent c9e0146459
commit 3a68ec1029
32 changed files with 39 additions and 36 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ module.exports = class NewYorkTimesCommand extends Command {
const data = body.response.docs[Math.floor(Math.random() * body.response.docs.length)];
const embed = new MessageEmbed()
.setColor(0xF6F6F6)
.setAuthor('New York Times', 'https://i.imgur.com/ZbuTWwO.png')
.setAuthor('New York Times', 'https://i.imgur.com/ZbuTWwO.png', 'https://www.nytimes.com/')
.setURL(data.web_url)
.setTitle(data.headline.main)
.setDescription(shorten(data.snippet))
+1 -1
View File
@@ -42,7 +42,7 @@ module.exports = class BulbapediaCommand extends Command {
const embed = new MessageEmbed()
.setColor(0x3E7614)
.setTitle(data.title)
.setAuthor('Bulbapedia', 'https://i.imgur.com/ePpoeFA.png')
.setAuthor('Bulbapedia', 'https://i.imgur.com/ePpoeFA.png', 'https://bulbapedia.bulbagarden.net/')
.setThumbnail(data.thumbnail ? data.thumbnail.source : null)
.setURL(`https://bulbapedia.bulbagarden.net/wiki/${encodeURIComponent(query).replace(/\)/g, '%29')}`)
.setDescription(shorten(data.extract.replace(/\n/g, '\n\n')));
+1 -1
View File
@@ -35,7 +35,7 @@ module.exports = class ForecastCommand extends Command {
const data = body.query.results.channel;
const embed = new MessageEmbed()
.setColor(0x0000FF)
.setAuthor(data.title, 'https://i.imgur.com/B9MMbtB.png')
.setAuthor(data.title, 'https://i.imgur.com/B9MMbtB.png', 'https://www.yahoo.com/news/weather')
.setURL(data.link)
.setTimestamp();
for (let i = 0; i < 7; i++) {
+1 -1
View File
@@ -36,7 +36,7 @@ module.exports = class GitHubCommand extends Command {
.get(`https://${GITHUB_USERNAME}:${GITHUB_PASSWORD}@api.github.com/repos/${author}/${repository}`);
const embed = new MessageEmbed()
.setColor(0xFFFFFF)
.setAuthor('GitHub', 'https://i.imgur.com/e4HunUm.png')
.setAuthor('GitHub', 'https://i.imgur.com/e4HunUm.png', 'https://github.com/')
.setTitle(body.full_name)
.setURL(body.html_url)
.setDescription(body.description ? shorten(body.description) : 'No description.')
+1 -1
View File
@@ -39,7 +39,7 @@ module.exports = class GoogleBookCommand extends Command {
.setColor(0x4285F4)
.setTitle(data.title)
.setURL(data.previewLink)
.setAuthor('Google Books', 'https://i.imgur.com/N3oHABo.png')
.setAuthor('Google Books', 'https://i.imgur.com/N3oHABo.png', 'https://books.google.com/')
.setDescription(data.description ? shorten(data.description) : 'No description available.')
.setThumbnail(data.imageLinks ? data.imageLinks.thumbnail : null)
.addField(' Authors',
+1 -1
View File
@@ -45,7 +45,7 @@ module.exports = class ITunesCommand extends Command {
const data = body.results[0];
const embed = new MessageEmbed()
.setColor(0xFEFEFE)
.setAuthor('iTunes', 'https://i.imgur.com/PR29ow0.jpg')
.setAuthor('iTunes', 'https://i.imgur.com/PR29ow0.jpg', 'https://www.apple.com/itunes/')
.setURL(data.trackViewUrl)
.setThumbnail(data.artworkUrl100)
.setTitle(data.trackName)
+1 -1
View File
@@ -36,7 +36,7 @@ module.exports = class KickstarterCommand extends Command {
.setColor(0x14E06E)
.setTitle(data.name)
.setURL(data.urls.web.project)
.setAuthor('Kickstarter', 'https://i.imgur.com/EHDlH5t.png')
.setAuthor('Kickstarter', 'https://i.imgur.com/EHDlH5t.png', 'https://www.kickstarter.com/')
.setDescription(shorten(data.blurb))
.setThumbnail(data.photo ? data.photo.full : null)
.addField(' Goal',
@@ -36,7 +36,7 @@ module.exports = class LeagueOfLegendsChampionCommand extends Command {
const tips = [].concat(data.allytips, data.enemytips);
const embed = new MessageEmbed()
.setColor(0x002366)
.setAuthor('League of Legends', 'https://i.imgur.com/2JL4Rko.png')
.setAuthor('League of Legends', 'https://i.imgur.com/2JL4Rko.png', 'https://leagueoflegends.com/')
.setTitle(`${data.name} ${data.title}`)
.setDescription(data.blurb)
.setThumbnail(`https://ddragon.leagueoflegends.com/cdn/${this.version}/img/champion/${data.image.full}`)
+1 -1
View File
@@ -35,7 +35,7 @@ module.exports = class MDNCommand extends Command {
const data = body.documents[0];
const embed = new MessageEmbed()
.setColor(0x066FAD)
.setAuthor('MDN', 'https://i.imgur.com/DFGXabG.png')
.setAuthor('MDN', 'https://i.imgur.com/DFGXabG.png', 'https://developer.mozilla.org/')
.setURL(data.url)
.setTitle(data.title)
.setDescription(data.excerpt);
+1 -1
View File
@@ -35,7 +35,7 @@ module.exports = class MyAnimeListAnimeCommand extends Command {
const data = body.anime.entry[0];
const embed = new MessageEmbed()
.setColor(0x2D54A2)
.setAuthor('My Anime List', 'https://i.imgur.com/5rivpMM.png')
.setAuthor('My Anime List', 'https://i.imgur.com/5rivpMM.png', 'https://myanimelist.net/')
.setURL(`https://myanimelist.net/anime/${data.id[0]}`)
.setThumbnail(data.image[0])
.setTitle(data.title[0])
+1 -1
View File
@@ -35,7 +35,7 @@ module.exports = class MyAnimeListMangaCommand extends Command {
const data = body.manga.entry[0];
const embed = new MessageEmbed()
.setColor(0x2D54A2)
.setAuthor('My Anime List', 'https://i.imgur.com/5rivpMM.png')
.setAuthor('My Anime List', 'https://i.imgur.com/5rivpMM.png', 'https://myanimelist.net/')
.setURL(`https://myanimelist.net/manga/${data.id[0]}`)
.setThumbnail(data.image[0])
.setTitle(data.title[0])
+1 -1
View File
@@ -35,7 +35,7 @@ module.exports = class NeopetItemCommand extends Command {
const price = search.text.match(/[0-9,]+ (NP|NC)/);
const embed = new MessageEmbed()
.setColor(0xFFCE31)
.setAuthor('Neopets', 'https://i.imgur.com/BP8qxJH.png')
.setAuthor('Neopets', 'https://i.imgur.com/BP8qxJH.png', 'http://www.neopets.com/')
.setTitle(text.match(/<h1>(.+)<\/h1>/)[1])
.setDescription(text.match(/<em>(.+)<\/em>/)[1])
.setURL(`https://items.jellyneo.net/item/${id[1]}/`)
+1 -1
View File
@@ -33,7 +33,7 @@ module.exports = class NPMCommand extends Command {
const dependencies = version.dependencies ? trimArray(Object.keys(version.dependencies)) : null;
const embed = new MessageEmbed()
.setColor(0xCB0000)
.setAuthor('NPM', 'https://i.imgur.com/ErKf5Y0.png')
.setAuthor('NPM', 'https://i.imgur.com/ErKf5Y0.png', 'https://www.npmjs.com/')
.setTitle(body.name)
.setURL(`https://www.npmjs.com/package/${pkg}`)
.setDescription(body.description || 'No description.')
+1 -2
View File
@@ -35,8 +35,7 @@ module.exports = class OsuCommand extends Command {
const data = body[0];
const embed = new MessageEmbed()
.setColor(0xFF66AA)
.setAuthor('osu!', 'https://i.imgur.com/hWrw2Sv.png')
.setURL('https://osu.ppy.sh/')
.setAuthor('osu!', 'https://i.imgur.com/hWrw2Sv.png', 'https://osu.ppy.sh/')
.addField(' Username',
data.username, true)
.addField(' ID',
+5 -2
View File
@@ -30,8 +30,11 @@ module.exports = class PokedexCommand extends Command {
const id = body.id.toString().padStart(3, '0');
const embed = new MessageEmbed()
.setColor(0xED1C24)
.setAuthor(`#${id} - ${filterPkmn(body.names).name}`, `https://www.serebii.net/pokedex-sm/icon/${id}.png`)
.setURL(`https://www.serebii.net/pokedex-sm/${id}.shtml`)
.setAuthor(
`#${id} - ${filterPkmn(body.names).name}`,
`https://www.serebii.net/pokedex-sm/icon/${id}.png`,
`https://www.serebii.net/pokedex-sm/${id}.shtml`
)
.setDescription(stripIndents`
**The ${filterPkmn(body.genera).genus}**
${filterPkmn(body.flavor_text_entries).flavor_text.replace(/\n|\f|\r/g, ' ')}
+1 -1
View File
@@ -42,7 +42,7 @@ module.exports = class RottenTomatoesCommand extends Command {
.setColor(0xFFEC02)
.setTitle(`${body.title} (${body.year})`)
.setURL(`https://www.rottentomatoes.com${body.url}`)
.setAuthor('Rotten Tomatoes', 'https://i.imgur.com/Sru8mZ3.jpg')
.setAuthor('Rotten Tomatoes', 'https://i.imgur.com/Sru8mZ3.jpg', 'https://www.rottentomatoes.com/')
.setDescription(shorten(body.ratingSummary.consensus))
.setThumbnail(body.posters.original)
.addField(' Critic Score',
+1 -1
View File
@@ -40,7 +40,7 @@ module.exports = class StackOverflowCommand extends Command {
const data = body.items[0];
const embed = new MessageEmbed()
.setColor(0xF48023)
.setAuthor('Stack Overflow', 'https://i.imgur.com/P2jAgE3.png')
.setAuthor('Stack Overflow', 'https://i.imgur.com/P2jAgE3.png', 'https://stackoverflow.com/')
.setURL(data.link)
.setTitle(data.title)
.addField(' ID',
+1 -1
View File
@@ -47,7 +47,7 @@ module.exports = class SteamCommand extends Command {
}
const embed = new MessageEmbed()
.setColor(0x101D2F)
.setAuthor('Steam', 'https://i.imgur.com/xxr2UBZ.png')
.setAuthor('Steam', 'https://i.imgur.com/xxr2UBZ.png', 'http://store.steampowered.com/')
.setTitle(data.name)
.setURL(`http://store.steampowered.com/app/${data.steam_appid}`)
.setThumbnail(tiny_image)
+1 -1
View File
@@ -40,7 +40,7 @@ module.exports = class TMDBMovieCommand extends Command {
.setColor(0x00D474)
.setTitle(body.title)
.setURL(`https://www.themoviedb.org/movie/${body.id}`)
.setAuthor('TMDB', 'https://i.imgur.com/3K3QMv9.png')
.setAuthor('TMDB', 'https://i.imgur.com/3K3QMv9.png', 'https://www.themoviedb.org/')
.setDescription(body.overview ? shorten(body.overview) : 'No description available.')
.setThumbnail(body.poster_path ? `https://image.tmdb.org/t/p/w500${body.poster_path}` : null)
.addField(' Runtime',
+1 -1
View File
@@ -40,7 +40,7 @@ module.exports = class TMDBTVShowCommand extends Command {
.setColor(0x00D474)
.setTitle(body.name)
.setURL(`https://www.themoviedb.org/tv/${body.id}`)
.setAuthor('TMDB', 'https://i.imgur.com/3K3QMv9.png')
.setAuthor('TMDB', 'https://i.imgur.com/3K3QMv9.png', 'https://www.themoviedb.org/')
.setDescription(body.overview ? shorten(body.overview) : 'No description available.')
.setThumbnail(body.poster_path ? `https://image.tmdb.org/t/p/w500${body.poster_path}` : null)
.addField(' First Air Date',
+1 -1
View File
@@ -31,7 +31,7 @@ module.exports = class TumblrCommand extends Command {
const data = body.response.blog;
const embed = new MessageEmbed()
.setColor(0x395976)
.setAuthor('Tumblr', 'https://i.imgur.com/ouD9TUY.png')
.setAuthor('Tumblr', 'https://i.imgur.com/ouD9TUY.png', 'https://www.tumblr.com/')
.setThumbnail(`https://api.tumblr.com/v2/blog/${blog}/avatar/512`)
.setURL(data.url)
.setTitle(data.title)
+1 -1
View File
@@ -33,7 +33,7 @@ module.exports = class TwitterCommand extends Command {
.query({ screen_name: user });
const embed = new MessageEmbed()
.setColor(0x55ADEE)
.setAuthor('Twitter', 'https://i.imgur.com/QnfcO7y.png')
.setAuthor('Twitter', 'https://i.imgur.com/QnfcO7y.png', 'https://twitter.com/')
.setThumbnail(body.profile_image_url_https)
.setURL(`https://twitter.com/${body.screen_name}`)
.setTitle(`${body.name} (@${body.screen_name})`)
+1 -1
View File
@@ -44,7 +44,7 @@ module.exports = class UrbanDictionaryCommand extends Command {
const data = body.list[type === 'top' ? 0 : Math.floor(Math.random() * body.list.length)];
const embed = new MessageEmbed()
.setColor(0x32A8F0)
.setAuthor('Urban Dictionary', 'https://i.imgur.com/Fo0nRTe.png')
.setAuthor('Urban Dictionary', 'https://i.imgur.com/Fo0nRTe.png', 'https://www.urbandictionary.com/')
.setURL(data.permalink)
.setTitle(data.word)
.setDescription(shorten(data.definition))
+1 -1
View File
@@ -38,7 +38,7 @@ module.exports = class VocaloidCommand extends Command {
const data = body.items[0];
const embed = new MessageEmbed()
.setColor(0x86D2D0)
.setAuthor('VocaDB', 'https://i.imgur.com/6QwraDT.jpg')
.setAuthor('VocaDB', 'https://i.imgur.com/6QwraDT.jpg', 'http://vocadb.net/')
.setTitle(data.name)
.setURL(`http://vocadb.net/S/${data.id}`)
.setDescription(data.lyrics.length ? shorten(data.lyrics[0].value) : 'No lyrics available.')
+1 -1
View File
@@ -36,7 +36,7 @@ module.exports = class WattpadCommand extends Command {
const data = body.stories[0];
const embed = new MessageEmbed()
.setColor(0xF89C34)
.setAuthor('Wattpad', 'https://i.imgur.com/lFTXnlz.png')
.setAuthor('Wattpad', 'https://i.imgur.com/lFTXnlz.png', 'https://www.wattpad.com/')
.setURL(data.url)
.setTitle(data.title)
.setDescription(shorten(data.description))
+1 -1
View File
@@ -34,7 +34,7 @@ module.exports = class WeatherCommand extends Command {
const data = body.query.results.channel;
const embed = new MessageEmbed()
.setColor(0x0000FF)
.setAuthor(data.title, 'https://i.imgur.com/B9MMbtB.png')
.setAuthor(data.title, 'https://i.imgur.com/B9MMbtB.png', 'https://www.yahoo.com/news/weather')
.setURL(data.link)
.setTimestamp()
.addField(' City',
+1 -1
View File
@@ -45,7 +45,7 @@ module.exports = class WikiaCommand extends Command {
.setColor(0x002D54)
.setTitle(data.title)
.setURL(search.body.items[0].url)
.setAuthor('Wikia', 'https://i.imgur.com/15A34JT.png')
.setAuthor('Wikia', 'https://i.imgur.com/15A34JT.png', 'http://www.wikia.com/fandom')
.setDescription(shorten(data.content.map(section => section.text).join('\n\n')))
.setThumbnail(data.images.length ? data.images[0].src : null);
return msg.embed(embed);
+1 -1
View File
@@ -42,7 +42,7 @@ module.exports = class WikipediaCommand extends Command {
const embed = new MessageEmbed()
.setColor(0xE7E7E7)
.setTitle(data.title)
.setAuthor('Wikipedia', 'https://i.imgur.com/Z7NJBK2.png')
.setAuthor('Wikipedia', 'https://i.imgur.com/Z7NJBK2.png', 'https://www.wikipedia.org/')
.setThumbnail(data.thumbnail ? data.thumbnail.source : null)
.setURL(`https://en.wikipedia.org/wiki/${encodeURIComponent(query).replace(/\)/g, '%29')}`)
.setDescription(shorten(data.extract.replace(/\n/g, '\n\n')));
+4 -2
View File
@@ -39,13 +39,15 @@ module.exports = class YouTubeCommand extends Command {
.setColor(0xDD2825)
.setTitle(data.snippet.title)
.setDescription(data.snippet.description)
.setAuthor(`YouTube - ${data.snippet.channelTitle}`, 'https://i.imgur.com/kKHJg9Q.png')
.setAuthor('YouTube', 'https://i.imgur.com/kKHJg9Q.png', 'https://www.youtube.com/')
.setURL(`https://www.youtube.com/watch?v=${data.id.videoId}`)
.setThumbnail(data.snippet.thumbnails.default ? data.snippet.thumbnails.default.url : null)
.addField(' ID',
data.id.videoId, true)
.addField(' Publish Date',
new Date(data.snippet.publishedAt).toDateString(), true);
new Date(data.snippet.publishedAt).toDateString(), true)
.addField(' Channel',
data.snippet.channelTitle, true);
return msg.embed(embed);
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
+1 -1
View File
@@ -34,7 +34,7 @@ module.exports = class YuGiOhCommand extends Command {
.setColor(0xBE5F1F)
.setTitle(data.name)
.setDescription(shorten(data.text))
.setAuthor('Yu-Gi-Oh!', 'https://i.imgur.com/AJNBflD.png')
.setAuthor('Yu-Gi-Oh!', 'https://i.imgur.com/AJNBflD.png', 'http://www.yugioh-card.com/')
.setThumbnail('attachment://thumbnail.jpg')
.addField(' Card Type',
data.card_type, true);
+1 -2
View File
@@ -16,8 +16,7 @@ module.exports = class NitroCommand extends Command {
run(msg) {
const embed = new MessageEmbed()
.setAuthor('Discord Nitro', 'https://i.imgur.com/DKaY8fV.jpg')
.setURL('https://discordapp.com/nitro')
.setAuthor('Discord Nitro', 'https://i.imgur.com/DKaY8fV.jpg', 'https://discordapp.com/nitro')
.setThumbnail('https://i.imgur.com/DKaY8fV.jpg')
.setColor(0x8395D3)
.setTimestamp()
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "66.4.3",
"version": "66.4.4",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {