Skip to content

Instantly share code, notes, and snippets.

@hayksaakian
Created December 4, 2014 01:34
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 hayksaakian/b72463d33fdd501f775e to your computer and use it in GitHub Desktop.
Save hayksaakian/b72463d33fdd501f775e to your computer and use it in GitHub Desktop.
var moment = require('moment');
var tz = require('moment-timezone');
var timePlugin = {
init: function (client, imports) {
return {
exports: null,
handlers: {
'!time': function (message) {
var timeNow = moment().tz('America/Chicago').format('ddd, h:mm A');
client.say(timeNow + ' Central Steven Time');
}
},
help: {
'command': [
'!time',
' ',
'Gives the requestor the time for steven (CST).'
]
},
commands: ['time'],
hooks: null
}
}
};
module.exports = timePlugin;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment