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
+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!`);