discord.htc
v0.2.1
Published
A JavaScript Handler made for Discord utilizing its API
Downloads
15
Readme
Documentation
##How to install
You will need node.js 4+ to run the library
####NPM Install Command
npm install discord.htc
or saving to your package.json
...
npm install --save discord.htc
###Ping Example
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()
##Discord Server
https://discord.gg/hbKjYTu
##NPM Package
https://www.npmjs.com/package/discord.htc