mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-25 06:42:51 +02:00
Add URLs to all author embed fields
This commit is contained in:
@@ -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!`);
|
||||
|
||||
Reference in New Issue
Block a user