swiftly.js
TypeScript icon, indicating that this package has built-in type declarations

12.0.10 • Public • Published

swiftly.js


Discord server NPM version NPM downloads Build status Dependencies Patreon

npm installnfo

About

Swiftly.JS is a powerful Node module that allows you to interact with the Discord API very easily.

This project is a fork of Discord.JS all credit to the contributors and developers of Discord.JS

  • Object-oriented
  • 100% coverage of the Discord API

Installation

Node.js 8.0.0+ is required.
Ignore any warnings about unmet peer dependencies, as they're all optional.

Without voice support: npm install swiftly.js
With voice support (node-opus): npm install swiftly.js node-opus
With voice support (opusscript): npm install swiftly.js opusscript

Optional packages

  • zlib-sync for significantly faster WebSocket data inflation (npm install zlib-sync)
  • erlpack for significantly faster WebSocket data (de)serialisation (npm install discordapp/erlpack)
  • One of the following packages can be installed for faster voice packet encryption and decryption:
  • uws for a much faster WebSocket connection (npm install uws)
  • bufferutil for a much faster WebSocket connection when not using uws (npm install bufferutil)

Example usage

const swift = require('swiftly.js');
const client = new swift.Client();
const token = 'TOKEN HERE';

client.on('ready', () => {
  console.log(`[CONNECTED] Logged in as ${client.user.tag}!`);
});

client.on('message', msg => {
  if (msg.content === 'ping') {
    msg.channel.send('pong');
  }
});

client.login(token);

Links

Help

If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official Swiftly.JS Server.

Package Sidebar

Install

npm i swiftly.js

Weekly Downloads

0

Version

12.0.10

License

Apache-2.0

Unpacked Size

546 kB

Total Files

167

Last publish

Collaborators

  • lukasharrison
  • highspearitt