Last active
August 29, 2015 14:22
-
-
Save pajlada/a91de83e24d8db4f018d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assist = function(message, advice) { | |
var params = _.rest(message.split(' '), 1); | |
if (params.length >= 1) { | |
get_user_by_param(params, function(err, user, db_user) { | |
if (user) { | |
chatMessage('/me @' + user.username + ' ' + advice ); | |
} else { | |
chatMessage('/me ' + advice); | |
} | |
}); | |
} else { | |
chatMessage('/me ' + advice); | |
} | |
exports.names = ['tp', 'tastyplug']; | |
exports.hidden = false; | |
exports.enabled = true; | |
exports.matchStart = true; | |
exports.cd_all = 15; | |
exports.cd_user = 30; | |
exports.cd_manager = 10; | |
exports.handler = function (data) { | |
assist(data.message, 'https://fungustime.pw/tastyplug/'); | |
}; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment