forked from GitHub/dbot
change youtube to yt
This commit is contained in:
parent
18f7f64b47
commit
60f9c5ef29
@ -64,7 +64,7 @@ var youtube = function(dbot) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
this.commands = {
|
this.commands = {
|
||||||
'~youtube': function(event) {
|
'~yt': function(event) {
|
||||||
this.api.search(event.input[1], function(body) {
|
this.api.search(event.input[1], function(body) {
|
||||||
if(_.isObject(body) && _.has(body, 'feed') && _.has(body.feed, 'entry')) {
|
if(_.isObject(body) && _.has(body, 'feed') && _.has(body.feed, 'entry')) {
|
||||||
event.reply(this.internalAPI.formatLink(body.feed.entry[0]));
|
event.reply(this.internalAPI.formatLink(body.feed.entry[0]));
|
||||||
@ -74,7 +74,7 @@ var youtube = function(dbot) {
|
|||||||
}.bind(this));
|
}.bind(this));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.commands['~youtube'].regex = [/^youtube (.+)$/, 2];
|
this.commands['~yt'].regex = [/^youtube (.+)$/, 2];
|
||||||
|
|
||||||
this.onLoad = function() {
|
this.onLoad = function() {
|
||||||
dbot.api.link.addHandler(this.name, this.LinkRegex,
|
dbot.api.link.addHandler(this.name, this.LinkRegex,
|
||||||
|
Loading…
Reference in New Issue
Block a user