2025-07-07 17:36:48 +02:00
2025-07-07 17:36:48 +02:00
2025-07-07 17:36:48 +02:00
2025-07-07 17:36:48 +02:00
2025-07-07 17:36:48 +02:00
2025-07-07 17:36:48 +02:00
2025-07-07 17:36:48 +02:00
2025-07-07 17:36:48 +02:00
2025-07-07 17:36:48 +02:00
2025-07-07 17:36:48 +02:00
2025-07-07 17:36:48 +02:00

Discord Audio Stream

npm GitHub package.json version GitHub Repo stars

This module is designed to work with discord.js/voice v0.18. This package doesn't support older versions!

👋 Support

Please create an issue on github or write fraujulian on discord!

📝 Usage

Install package

npm install discord-audio-stream opusscript @discordjs/voice ffmpeg-static sodium-native

Create Instance

let audioManager = new AudioManager();

or (with parameters)

let audioManager = new AudioManager({
        VoiceChannelId: 0, //voice channel id where to play music
        GuildId: 0, //guild id
        VoiceAdapter: 0 //guild VoiceAdapter
    },
    {
        ResourceType: "", //resource type like link or file
        Resource: "" //auto play link or file name
    });

Properties of the AudioManager

Properties

Callable with Type Description
VoiceConnection VoiceConnection VoiceConnection instance from discord.js/voice.
AudioPlayer AudioPlayer AudioPlayer instance from discord.js/voice.
AudioResource AudioResource AudioResource instance from discord.js/voice.
ConnectionData VoiceConnectionDataModel Global variable for connection data.
AudioData AudioDataModel Global variable for audio data.

Methods

Callable with Parameters Return type Description
OverrideOptions connectionData (type of VoiceConnectionDataModel), audioData (type of VoiceAudioDataModel) void Method to override global variables, connectionData and audioData.
CreateConnection isRenew (type of boolean, default value is false) void Method to join the voice connection.
PlayAudioOnConnection void Method to play audio on the existing voice connection.
PauseAudio void Method to pause the audio.
ResumeAudio void Method to resume the audio.
StopAudioOnConnection void Method to stop the audio without destroying voice connection.
CreateConnectionAndPlayAudio void Method to join the voice connection and play audio.
DestroyConnection void Method to destroy the voice connection.
SetVolume volume (type of number, 0 - 100 percent) void Method to set the audio volume.
SetMaxListeners maxListeners (type of number) void Method to set the max listeners of the audio stream.
Types History

📋 Credits:

~ FrauJulian.

🤝 Enjoy the package?

Give it a star on github!

S
Description
🖼️ NodeJs library for discord to make 24/7 audio streaming easier.
https://www.npmjs.com/package/discord-audio-stream Readme AGPL-3.0
5.3 MiB
Languages
TypeScript 86.9%
JavaScript 13%