Skip to content

Instantly share code, notes, and snippets.

@KartikTalwar
Created April 27, 2012 17:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KartikTalwar/2511169 to your computer and use it in GitHub Desktop.
Save KartikTalwar/2511169 to your computer and use it in GitHub Desktop.
Ned Bot LMGTFY Plugin
var plugin = {
name : 'lmgtfy', // must be unique
trigger : ['lmgtfy', 'lmbtfy'], // prefix ned
enabled : 'true', // plugin can be inactive
fuzzy : 'false', // autocorrect mispelled trigger
description : 'Googles things for you', // about the plugin
usage : 'ned lmgtfy yahoo' // usage example
};
module.exports.plugin = plugin;
module.exports[plugin.name] = function(get)
{
/* Available Data: */
// get.message
// get.from
// get.firstName
// get.roomName
// get.fullMessage
// get.isPrivate
// get.isEmpty
var query = Util.padd(get.message); // escapes it
var resp = "http://lmgtfy.com/?q=" + query;
sendMessage(resp);
return true;
}
var plugin = {
name : 'podbaydoors',
trigger : "[Nn]ed.+[Oo]pen.*pod.*bay.*door.*$",
enabled : 'true',
fuzzy : 'false',
description : '',
usage : ''
};
module.exports.plugin = plugin;
module.exports[plugin.name] = function(get)
{
sendMessage("I'm sorry " + get.firstName + ", I can't do that");
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment