2.0.0 • Published 12 months ago

distype v2.0.0

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
12 months ago

About

A Discord library written in TypeScript for developers looking to interface directly with the Discord API with little to no abstractions.

Features

  • Lightweight: Distype uses minimal dependencies, and is highly performant due to the absence of transforming raw data from Discord into complex structures and abstractions.
  • Scalable: With a built-in sharding manager (that supports big bot sharding) and a focus on performance, Distype makes it easy to scale your bot.
  • Predictable: Distype is as close as you can get to the Discord API, meaning that typically, what you see in Discord's documentation is also here.
  • Modular: The cache manager, gateway manager, and rest manager can all be instantiated independently, allowing for super lightweight solutions.
  • Fully Featured: Distype covers 100% of the Discord API, meaning that you'll never be missing out on any features.
  • Highly Configurable: Distype aims to offer as much configuration as possible of its internals, such as fully controllable cache behavior, retry and rate limit behavior, custom rest and gateway base URLs for proxy solutions, access to low-level http and websocket options, and more.

Links

Related Packages

Example Bot

// Import Distype and logging typings.
import { Client, LogCallback } from 'distype';

// Distype pushes logging events through callbacks, and allows you to define your own logger.
const logger: LogCallback = (message, { level }) => console.log(`${level} | ${message}`);

// Creates the client. The client creates a cache, gateway, and rest manager. The first parameter is your
// bot's token, followed by client options, then finally the log callback.
const client = new Client(YOUR_BOT_TOKEN, {}, logger);

// This connects the client to the gateway.
client.gateway.connect();

Note that Discord API typings are for API version 10, and are from discord-api-types. While you can still specify different API versions to be used, it is not recommended.

Installation

Distype can be installed via npm.

npm install distype

Prerequisites

Optional packages

2.0.0

12 months ago

1.2.0

2 years ago

1.2.1

2 years ago

1.1.0

2 years ago

0.19.0

2 years ago

0.17.2

2 years ago

0.15.0

2 years ago

0.16.0

2 years ago

0.15.1

2 years ago

0.17.0

2 years ago

0.16.1

2 years ago

0.18.0

2 years ago

0.17.1

2 years ago

0.13.0

2 years ago

0.12.1

2 years ago

0.14.0

2 years ago

0.13.1

2 years ago

0.12.2

2 years ago

0.14.1

2 years ago

0.9.4

2 years ago

0.9.3

2 years ago

0.9.6

2 years ago

0.9.5

2 years ago

0.11.0

2 years ago

0.10.1

2 years ago

0.12.0

2 years ago

0.10.0

2 years ago

0.9.0

2 years ago

0.9.2

2 years ago

0.9.1

2 years ago

0.8.0

2 years ago

0.1.0

2 years ago

0.3.0

2 years ago

0.2.0

2 years ago

0.7.1

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.7.0

2 years ago

0.6.1

2 years ago

0.5.2

2 years ago

0.6.0

2 years ago

0.5.1

2 years ago

0.0.4

4 years ago

0.0.1

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

1.0.1

2 years ago

1.0.0-beta

4 years ago

1.0.3-alpha

4 years ago

1.0.2-alpha

4 years ago

1.0.1-alpha

4 years ago

1.0.0-alpha

4 years ago

1.0.0

2 years ago