-
-
Notifications
You must be signed in to change notification settings - Fork 93
Installation
DisTube depends on several libraries and system tools to function correctly. This guide will walk you through setting everything up.
-
Node.js:
22.12.0or higher -
discord.js:
v14 - @discordjs/voice: Required for audio handling
- @discordjs/opus: Opus encoding/decoding
- FFmpeg: Required for audio processing and filtering
Install DisTube and its peer dependencies in your project:
# Using bun (recommended)
bun add distube @discordjs/voice @discordjs/opus
# Using npm
npm install distube @discordjs/voice @discordjs/opus
# Using yarn
yarn add distube @discordjs/voice @discordjs/opus
# Using pnpm
pnpm add distube @discordjs/voice @discordjs/opusTip
We recommend using Bun for faster installation and better performance.
DisTube uses FFmpeg for audio processing. You must have it installed on your system and added to your PATH.
- Windows: Download Guide
-
Linux (Ubuntu/Debian):
sudo apt-get install ffmpeg -
MacOS:
brew install ffmpeg
Note
If the links above are unavailable, you can find static builds here.
Warning
Do NOT install the ffmpeg or ffmpeg-static npm packages, as they can cause stability and performance issues.
Discord.js requires an encryption library for voice support. DisTube will work with any library supported by @discordjs/voice.
Check if your system supports aes-256-gcm natively:
require('node:crypto').getCiphers().includes('aes-256-gcm')If it returns false, you must install one of the following:
- @noble/ciphers (Recommended)
- sodium-native
# Using bun
bun add @noble/ciphers
# Using npm
npm install @noble/ciphersHome - Installation - [Guide](DisTube Guide) - API Documentation - Discord Support