npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

paracord

v0.0.4

Published

Scalable Discord gateway and API handlers alongside a pre-built client.

Downloads

5

Readme

Paracord

Table of Contents


About

A highly-scalable NodeJS framework built to interact with Discord's API.

Paracord addresses an important problem that large bot owners will inevitably encounter, how to avoid the exponential costs of vertically scaling infrastructure in the cloud while maintaining high reliability and availability. Paracord solves this by utilizing clients and servers running grpc to support limited interprocess communication between shards on remote hosts. Bots of all sizes can use this framework to get started and seamlessly transition to multi-shard and eventually multi-host configurations with the addition of just a few lines of code.

NOT YET READY FOR PRODUCTION. If you choose to use the modules in this library, understand that nothing here is set in stone and breaking changes may occur without warning.


Features

  • Native horizontal scaling
  • Internal sharding
  • Fast and efficient inter-host communication with grpc
  • Leverages pm2 for additional shard separation and log management
  • Modularized REST and Gateway clients
  • Optional remote rate limit handling
  • Limited abstractions, work closer to the API

Getting started

Requirements

Paracord requires NodeJS 10.17+.

If you plan to use the Shard Launcher, a global installation of pm2 is required. This is not true for internal sharding. To install pm2 globally, run the following command:

npm install pm2 -g

Installing

Getting started with any of the clients is as simple as installing the package into your project and importing the client you want.

npm install paracord

Optional Dependencies

Optional dependencies should be installed with the package. However, if you choose to not install them then here is what to know.

For sharding, the pm2 npm package will need to be installed to your project:

npm install pm2

If you plan to use the rpc services, you will need to install the grpc packages in the command below:

npm install [email protected] @grpc/[email protected] @grpc/[email protected]

Examples

Importing a client into your project is easy.

// This is an example. You can find more in the examples directory of this repo.
const { Paracord } = require("paracord");

The available clients are Paracord, Api, Gateway, ShardLauncher, and Server. In a generalized bot scenario, you will be using the Paracord client.

Examples with each client can be found in docs/examples.


Missing Features

At the moment, Paracord is missing some functionality that is common in Discord frameworks. they are listed here:

  • Voice handling
  • Connection compression

Contributing

Right now there is no formal process for contributing. If you wish to start making contributions, please reach out to me, Lando#7777, first. You can find me in the Paracord Discord.


Licensing

The code in this project is licensed under the Apache 2.0 license.


Links

  • Discord Server: https://discord.gg/EBp3GCm
  • Repository: https://github.com/paracordjs/paracord
  • Issue tracker: https://github.com/paracordjs/paracord/issues
    • In case of sensitive bugs like security vulnerabilities, please contact [email protected] directly instead of using issue tracker. We value your effort to improve the security and privacy of this project!
  • Related projects:
    • Statbot: https://statbot.net/