Skip to content

Latest commit

 

History

History
59 lines (40 loc) · 1.58 KB

README.md

File metadata and controls

59 lines (40 loc) · 1.58 KB

discord.htc logo

npm version david

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