You will need node.js 4+ to run the library
npm install discord.htc
or saving to your package.json
...
npm install --save discord.htc
const DHTC = require('discord.htc')
var bot = new DHTC('bot token')
var prefix = '!'
bot.on('botReady', () => {
console.log('Ready!')
})
bot.on('createdMessage', (message) => {
if (message.content.startsWith(`${prefix}ping`)) {
bot.makeMessage(message.channel_id, 'pong')
}
})
bot.connect()