Skip to content

Instantly share code, notes, and snippets.

@psykzz
Created August 29, 2017 18:14
Show Gist options
  • Save psykzz/d2222d0d98622aa85e0ef9c68dcd576f to your computer and use it in GitHub Desktop.
Save psykzz/d2222d0d98622aa85e0ef9c68dcd576f to your computer and use it in GitHub Desktop.
const Discord = require("discord.js");
const client = new Discord.Client();
client.on('message', msg => {
if (msg.content === 'time') {
var today = new Date();
msg.reply(`Time: ${today.getHours()}:${today.getMinutes()}:${today.getSeconds()}`);
}
});
client.login('token');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment