npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

discordjs-nextgen-voice

v0.2.0

Published

Native voice plugin for discordjs-nextgen (without @discordjs/voice)

Downloads

1,246

Readme

discordjs-nextgen-voice

Turkish Documentation

Native voice plugin for discordjs-nextgen.

Installation

npm install discordjs-nextgen discordjs-nextgen-voice

Quick Usage

import { App, Intents } from 'discordjs-nextgen';
import { VoicePlugin } from 'discordjs-nextgen-voice';

const app = new App({ intents: Intents.ALL });

app.use(new VoicePlugin({
  autoLeave: true,
  defaultVolume: 0.5,
  dave: {
    enabled: true,
    maxProtocolVersion: 1,
  },
}));

The plugin automatically uses the adapter provided by discordjs-nextgen core.

Join a Voice Channel

ctx.voice.join

const joinCommand = {
  name: 'join',
  run: async (ctx, args) => {
    const channelId = args[0];
    if (!channelId) {
      return ctx.reply('Usage: !join <channelId>');
    }

    await ctx.voice.join({ channelId });
    await ctx.reply('Joined the voice channel.');
  },
};

app.voice.join

await app.voice.join({
  guildId: 'GUILD_ID',
  channelId: 'VOICE_CHANNEL_ID',
});

Optional Adapter Customization

app.use(new VoicePlugin({
  adapterProvider: (guildId, ctx) => {
    return undefined;
  },
}));

Play Audio

const playCommand = {
  name: 'play',
  run: async (ctx, args) => {
    const url = args[0];

    await ctx.voice.play(url, {
      title: 'Requested song',
      requestedBy: ctx.user.tag,
      join: {
        channelId: 'VOICE_CHANNEL_ID',
      },
    });

    await ctx.reply('Playback started.');
  },
};

Other Commands

ctx.voice.pause();
ctx.voice.resume();
ctx.voice.skip();
ctx.voice.stop();
ctx.voice.leave();

DAVE Debug

const daveStateCommand = {
  name: 'davestate',
  run: async (ctx) => {
    const state = ctx.voice.getDaveState();
    await ctx.reply(`DAVE phase: ${state.phase}, requiredByServer: ${state.requiredByServer}`);
  },
};

API

  • app.voice.join({ guildId, channelId, adapterCreator })
  • app.voice.play(guildId, source, options?)
  • app.voice.pause(guildId)
  • app.voice.resume(guildId)
  • app.voice.skip(guildId)
  • app.voice.stop(guildId)
  • app.voice.setVolume(guildId, value)
  • app.voice.getQueue(guildId)
  • ctx.voice.join(...)
  • ctx.voice.play(...)
  • ctx.voice.pause()
  • ctx.voice.resume()
  • ctx.voice.skip()
  • ctx.voice.stop()
  • ctx.voice.setVolume(value)
  • ctx.voice.getQueue()

Notes

  • ffmpeg is required for remote URLs or stream sources. The package ships with ffmpeg-static.
  • Your bot needs Connect and Speak permissions.
  • For YouTube support, create a stream via a library like play-dl and pass it to ctx.voice.play(stream).
  • ctx.voice.join() and ctx.voice.play(..., { join: ... }) require a guild context.

License

MIT