1.5.3 • Published 3 years ago

discord-rose v1.5.3

Weekly downloads
178
License
ISC
Repository
github
Last release
3 years ago

Discord-Rose

The simple Discord library for advanced users.

Installation

Run npm i --save discord-rose

Links

Wiki Docs

Support Server

NPM, GitHub

Simple bot

You can easily use the SingleWorker class for easy use of discord-rose, for scaled solution, look below

./index.js

const { SingleWorker } = require('discord-rose')

const worker = new SingleWorker({
  token: 'BOT TOKEN'
})

worker.commands
  .prefix('!')
  .add({
    command: 'hello',
    exec: (ctx) => {
      ctx.reply('World!')
    }
  })

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

const { Master } = require('discord-rose')
const path = require('path')

const master = new Master(path.resolve(__dirname, './worker.js'), {
  token: 'BOT TOKEN'
})

master.start()

./worker.js

const { Worker } = require('discord-rose')

const worker = new Worker()

worker.commands
  .prefix('!')
  .add({
    command: 'hello',
    exec: (ctx) => {
      ctx.reply('World!')
    }
  })

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 since master & worker introduce more process overhead

You can even easily implement slash commands directly within message commands.

Ready to take it to the next level? Take a look out our Wiki

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.5

3 years ago

1.4.4

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.3.4

3 years ago

1.4.0

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.2

3 years ago

1.2.0

3 years ago

1.2.1

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.2.0

3 years ago

0.1.0

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.13

3 years ago

0.0.11

3 years ago

0.0.12

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.1-a

3 years ago

0.0.1

3 years ago