forked from GitHub/dbot
set last link in channel when ~yt command is used
This commit is contained in:
parent
bb28cebde1
commit
597171c37d
@ -93,6 +93,7 @@ var youtube = function(dbot) {
|
|||||||
}, function(error, response, body) {
|
}, function(error, response, body) {
|
||||||
if(_.isObject(body) && _.has(body, 'items') && body.items.length > 0) {
|
if(_.isObject(body) && _.has(body, 'items') && body.items.length > 0) {
|
||||||
event.reply(this.internalAPI.formatLink(body.items[0]));
|
event.reply(this.internalAPI.formatLink(body.items[0]));
|
||||||
|
dbot.modules.link.links[event.channel.name] = 'https://youtu.be/' + body.items[0].id;
|
||||||
}
|
}
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user