
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
discord-play
Advanced tools
A robust wrapper module for @discordjs/voice, implementing functions and emitting events making it easier to interact with the new voice module.
A robust wrapper module for @discordjs/voice, implementing functions and emitting events making it easier to interact with the new voice module.
DisPlayConnection (Voice Connection class)
voiceConnectionKick
, voiceConnectionMove
, etc.toggleMute
and toggleDeafen
.DisPlayPlayer (Audio Player class)
audioPlayerStart
, audioPlayerFinish
, etc.play
function which supports playing from local audio files or online audio urls to readable stream of audio data or even a premade Audio Resource.togglePause
, toggleMute
.For any help, feel free to join the discord server and ask.
The following are some required npm packages to be installed (alternatives provided) :
discord.js
v13+@discordjs/voice
(Gets automatically installed as dependency)@discordjs/opus
or opusscript
ffmpeg-static
or ffmpeg installed globally in your systemsodium
or libsodium-wrappers
import { DiscordPlay, DisPlayEvent } from 'discord-play';
// or
const { DiscordPlay, DisPlayEvent } = require('discord-play');
import { DisPlayConnection, DisPlayPlayer, DisPlayEvent } from 'discord-play';
// joins the voice channel and attaches all connection logic
const connection = new DisPlayConnection(message.member.voice);
// attaches the premade audio player to the connection created
const player = new DisPlayPlayer(message.guild.id);
// sample connection event
connection.on(DisPlayEvent.VOICE_JOIN, (voiceId) => {
message.reply("Joined the voice channel.");
});
// sample player event
player.on(DisPlayEvent.PLAYING, () => {
message.channel.send("Now playing.");
});
This repository uses MIT license.
FAQs
A robust wrapper module for @discordjs/voice, implementing functions and emitting events making it easier to interact with the new voice module.
The npm package discord-play receives a total of 6 weekly downloads. As such, discord-play popularity was classified as not popular.
We found that discord-play demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.