Discordeno
Discord API library for Node.JS, Deno & Bun
Getting started
More details are available in the documentation
- npm install @discordeno/bot
- yarn add @discordeno/bot
- pnpm install @discordeno/bot
- bun install @discordeno/bot
[!TIP]
If you are not sure if Discordeno is right for you check everything below.
Packages
| Package | npm | Tests |
| ------------------------------------------------------------------------ | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| discordeno | !npm | |
| @discordeno/types | !npm |
|
| @discordeno/utils | !npm |
|
| @discordeno/rest | !npm |
|
| @discordeno/gateway | !npm |
|
| @discordeno/bot | !npm |
|
Features
Discordeno is actively maintained to guarantee excellent performance, latest features, and ease of use.
- Simple, Efficient, and Lightweight: Discordeno is lightweight, simple to use, and adaptable.
- Functional API:
- Cross Runtime: Supports the Node.js, Deno, and Bun runtimes.
- Standalone components: Discordeno offers the option to have practically any component of a bot as a separate
- Flexibility/Scalability: Remove any properties, if your bot doesn't need them. For instance, remove
Channel.topicif your bot doesn't require it. You may save GBs of RAM in this way. A few lines of code are all that are needed to accomplish this for any property on any object.
REST
- Freedom from 1 hour downtimes due to invalid requests
- Freedom from global rate limit errors
- REST does not rest!
- Single point of contact to Discord API
- Scalability! Scalability! Scalability!
Gateway
- Zero Downtime Updates:
- Zero Downtime Resharding:
- Horizontal Scaling:
- No Loss Restarts:
- Flexibility:
- Clustering With Workers:
Custom Cache
Have your cache setup in any way you like. Redis, PGSQL or any cache layer you would like.
Links
Discordeno follows semantic versioningContributing/Developing
We use yarn as package manager and workspace manager, and turborepo as monorepo manager.
To config the workspace run
# if you don't have yarn installed
npm install -g yarn
yarn install
Then you can build all the files and types across all packages using (unless specified all commands below are run at root directory)
yarn release-build
You can run unit tests on all packages using
yarn test:unit
Other useful information are available on the website under the contributing documentation
Other useful scripts (if you run in a package's directory, you need to build dist before test and build types before check. Running in root directory should automatically do it for you)
# format and lint the code
yarn check
check type
yarn test:type
check type for tests
yarn test:test-type
unit test showing coverage
yarn test:unit-coverage
unit test with Deno
yarn test:deno-unit
unit test with Bun
yarn test:bun-unit
integration test
yarn test:integration
e2e test
yarn test:e2e
build doc for website
yarn build:doc