Skip to content

Instantly share code, notes, and snippets.

@photofroggy
Created December 27, 2012 05:27
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 photofroggy/4385696 to your computer and use it in GitHub Desktop.
Save photofroggy/4385696 to your computer and use it in GitHub Desktop.
// Get a reference to the client.
var wsc = $().wsc();
// Add a new extension.
wsc.add_extension( function( client ) {
// Create command /foo and provide a handler.
client.bind('cmd.foo', cmd_foo);
var cmd_foo = function( cmd ) {
// Just say "Bar!"
client.say( cmd.target, 'Bar!');
};
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment