/thiscord.js

A simple JavaScript library that listens to Discord API Gateway

Primary LanguageJavaScript

ThisCord.js

Description

A simple JavaScript library that listens to Discord API Gateway

Checklist

  • 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

Installation

npm i @danspotnytool/thiscord.js

Example

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');

Contributing

  • Before creating an issue, please ensure that it hasn't already been reported/suggested
  • I need help with documentation because I can't understand TypeScript and there's not enough tutorial for JSdoc