A simple JavaScript library that listens to Discord API Gateway
- Listen to Discord API Gateway
- Receive events (MESSAGE_CREATE, READY, etc...)
- Validate token before opening a connection
- Check if the token is for a bot or a user account
- Documentation
- All events
npm i @danspotnytool/thiscord.js
const ThisCord = require('@danspotnytool/thiscord.js'); // Because npm won't allow me to use `thiscord,js`
const client = new ThisCord.Client();
client.on('ready', () => {
console.log('Ready!');
});
client.on('messageCreate', (msg) => {
console.log(`${msg.author.username}: ${msg.content}`);
});
client.login('TrustMeThisTokenIsLegit');