The Grinch
The Grinch
DIAdiscord.js - Imagine an app
Created by The Grinch on 2/4/2025 in #djs-voice
Player plays fine using string but not via createReadStream
No error is thrown either. Report:
Core Dependencies
- @discordjs/voice: 0.18.0
- prism-media: 1.3.5

Opus Libraries
- @discordjs/opus: 0.10.0
- opusscript: not found

Encryption Libraries
- sodium-native: not found
- sodium: not found
- libsodium-wrappers: 0.7.15
- @stablelib/xchacha20poly1305: not found
- @noble/ciphers: not found

FFmpeg
- version: N-93090-g7cab5471b2
- libopus: yes
--------------------------------------------------
Core Dependencies
- @discordjs/voice: 0.18.0
- prism-media: 1.3.5

Opus Libraries
- @discordjs/opus: 0.10.0
- opusscript: not found

Encryption Libraries
- sodium-native: not found
- sodium: not found
- libsodium-wrappers: 0.7.15
- @stablelib/xchacha20poly1305: not found
- @noble/ciphers: not found

FFmpeg
- version: N-93090-g7cab5471b2
- libopus: yes
--------------------------------------------------
code:
const jeffStream = () => {
return createAudioResource(
createReadStream(ASSETS_REPO.jeffSinging),
{
inputType: StreamType.OggOpus,
}
);
}

const connection = joinVoiceChannel({
channelId: jeffChannel.id,
guildId: jeffChannel.guild.id,
adapterCreator: jeffChannel.guild.voiceAdapterCreator,
});

const player = createAudioPlayer();
connection.subscribe(player);
player.play(jeffStream());
const jeffStream = () => {
return createAudioResource(
createReadStream(ASSETS_REPO.jeffSinging),
{
inputType: StreamType.OggOpus,
}
);
}

const connection = joinVoiceChannel({
channelId: jeffChannel.id,
guildId: jeffChannel.guild.id,
adapterCreator: jeffChannel.guild.voiceAdapterCreator,
});

const player = createAudioPlayer();
connection.subscribe(player);
player.play(jeffStream());
12 replies