From 597171c37d9901d6973f7bf60d0dc14448b9f5be Mon Sep 17 00:00:00 2001 From: Scritches Date: Tue, 10 Apr 2018 13:30:20 -0400 Subject: [PATCH] set last link in channel when ~yt command is used --- modules/youtube/youtube.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/youtube/youtube.js b/modules/youtube/youtube.js index 154d1e1..a661fe5 100644 --- a/modules/youtube/youtube.js +++ b/modules/youtube/youtube.js @@ -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 {