A JavaScript wrapper for the Discord API.
npm install birb


sh-session
npm install birb
or
yarn add birb
or
pnpm add birb
`
$3
Birb.JS comes with a few optional addons made by our team.
Please view their documentation for more information on how to use them.
- @birbjs/framework is a framework to make the development of Discord bots easier and more efficient. It includes an in-built command handler, permission system, event manager and built-in slash command support (npm install @birbjs/framework)
- @birbjs/sharding is a sharding utility that makes it easier to shard your Discord bot (npm install @birbjs/sharding)
- @birbjs/cluster is a clustering utility that is built for larger Discord bots who need to split shards across multiple seperate servers (npm install @birbjs/cluster)
- @birbjs/devtools is a debugging tool for Birb.js developers, contributors and maintainers. (npm install @birbjs/devtools --save-dev)
$3
These dependencies aren't required, but will allow Birb.JS to do things more efficiently. NPM may attempt to install these by default. To force NPM to not attempt to install these, add the --no-optional command line argument.
- erlpack for faster (de)serialization of websocket data (npm install erlpack)
- zlib-sync for websocket compression (npm install zlib-sync)
- bufferutil for quicker (un)masking of websocket data and packets (npm install bufferutil)
- utf-8-validate for more efficient websocket data validation (npm install utf-8-validate)
- @discordjs/opus for voice support - e.g. talking in voice channels (npm install @discordjs/opus)
Most of these dependencies require node-gyp which some users may struggle to install (mostly due to very unhelpful errors).
If you're on Windows, run npm install windows-build-tools --global in an administrator command prompt.
If you're on Ubuntu, run sudo apt install build-tools.
Remember that these are optional dependencies. If you're struggling, feel free to ignore them. Birb.JS will only use them if they are available.
Example
`js
const { Client, Intents } = require('birb');
const client = new Client({
intents: new Intents(Intents.FLAGS.ALL),
});
client.listen('ready', () => {
console.log('Connected to Discord!');
});
client.connect('your_bot_token');
``