1.0.0 • Published 5 years ago

@apacheli/harmony v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Harmony

Discord https://img.shields.io/npm/v/@apacheli/harmony.svg

A Discord bot library for the Node.js environment.

Installing

Node.js 10 is required at the very minimum. Go here to install it.

npm install @apacheli/harmony

Sample

const Harmony = require('@apacheli/harmony');
const token = 'Bot TOKEN';
const bot = Harmony.ws.createClient();

bot.emitter.on('ready', () => {
  console.log('I am ready!');
});

bot.emitter.on('messageCreate', (msg) => {
  if (msg.content === 'ping') {
    Harmony.rest.createMessage(token, msg.channelID, {
      content: 'Pong!'
    });
  }
});

Harmony.ws.connect(token, null, bot);

More samples can be found here.

Support

Feel free to join the Discord server for support.

1.0.0

5 years ago

0.1.0

5 years ago