https://github.com/jpbberry/jadl
Scale clean and hassle-free Discord bots with a simple library catered for advanced developers. Develop with ease and confidence now.
https://github.com/jpbberry/jadl
Last synced: 3 months ago
JSON representation
Scale clean and hassle-free Discord bots with a simple library catered for advanced developers. Develop with ease and confidence now.
- Host: GitHub
- URL: https://github.com/jpbberry/jadl
- Owner: jpbberry
- License: apache-2.0
- Created: 2021-08-16T23:59:50.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-17T01:02:38.000Z (about 3 years ago)
- Last Synced: 2025-03-12T23:32:55.009Z (3 months ago)
- Language: TypeScript
- Homepage: https://jadl.js.org
- Size: 523 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Just another Discord Library
*Formerly known as discord-rose, pronounced jay-dull*Scale clean and hassle-free Discord bots with a simple library catered for advanced developers. Develop with ease and confidence now.
# Installation
Run `npm i --save jadl`
## Links
[Wiki](https://github.com/jpbberry/jadl/wiki) [Docs](https://jadl.js.org)
[Support Server](https://discord.gg/EdpA6qRHhs)
[NPM](https://npmjs.com/package/jadl), [GitHub](https://github.com/jpbberry/jadl)
# Simple bot
You can easily use the `SingleWorker` class for easy use of JADL, for scaled solution, look [below](#scaled-bot)
**./index.js**
```js
const { SingleWorker } = require('jadl')const worker = new SingleWorker({
token: 'BOT TOKEN'
})
```# Scaled Bot
You can instead use a `Master` & `Worker` solution, one master managing multiple workers/clusters, which hold x amount of shards, making it much more efficient.
**./master.js**
```js
const { Master } = require('jadl')
const path = require('path')const master = new Master(path.resolve(__dirname, './worker.js'), {
token: 'BOT TOKEN'
})master.start()
```**./worker.js**
```js
const { Worker } = require('jadl')const worker = new Worker()
```
Do `node ./master.js` and you're off to the races. Scaled automatically.*Do note if your bot only ever fits into 1 cluster (< 5000 servers by default), you should consider using [SingleWorker](#simple-bot) since master & worker introduce more process overhead*
# Commands
Commands are offloaded to a separate library, you can of course just build your own with the given Discord events, but feel free to checkout [@jadl/cmd](https://npmjs.com/@jadl/cmd), a competent super-powered command handler built around decorators (TypeScript only) and slash commands only, made simple and easy to use.
## Ready to take it to the next level? Take a look out our [Wiki](https://github.com/jpbberry/jadl/wiki)