1.0.0 • Published 5 years ago
@apacheli/harmony v1.0.0
Harmony
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.