3
0
mirror of https://github.com/reality/dbot.git synced 2024-11-23 12:29:26 +01:00

set last link in channel when ~yt command is used

This commit is contained in:
Scritches 2018-04-10 13:30:20 -04:00
parent bb28cebde1
commit 597171c37d

View File

@ -93,6 +93,7 @@ var youtube = function(dbot) {
}, function(error, response, body) {
if(_.isObject(body) && _.has(body, 'items') && body.items.length > 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));
} else {