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 🙏

© 2025 – Pkg Stats / Ryan Hefner

revoice.js

v0.2.166

Published

A voice module for Revolt

Readme

Revoice.js - A Voice Module for Stoat (Revolt)

A Node.js package allowing bots (or selfbots) to connect to voice channels on the Discord-alternative Stoat, formerly Revolt.

Features:

  • Audio Playback
  • Pausing/Resuming Playback
  • Adjusting volume
  • User Events (joining/leaving)

This package is still in development. If you need a certain feature currently not implemented, please open an issue and let me know about it. I will see what I can do :)

Livekit Update

Stoat, formerly Revolt, has updated to a new voice system called Livekit. Revoice.js has been updated to support this and is a lot more stable now.
The rewrite was made with backwards-compatibility in mind so any programs using Revoice written before the switch should still work after updating to the newest Revoice version. However, minor issues may arise (such as media.playbackPaused being removed in favour of media.paused).
To connect to Stoat instances still using Vortex, the old Revoice and MediaPlayer are still accessible by importing them through require("revoice.js").legacy.

Installation

Just execute npm install revoice.js to install the package, have fun! :)

Usage

TL;DR: You initiate a client, you join a voice channel and then you play media.

Please note that unlike on Discord bots, Stoat bots are able to join multiple voice channels at once. Thus a single bot is able to be in every voice channel it has access to. I have no idea about the limitations.

Media has to be created using the MediaPlayer class. You can stream both node streams and media files to revolt.

Example:

If you want to see a working music bot using revoice, check out Remix!

const { Revoice, MediaPlayer } = require("revoice.js");
const fs = require("fs");

const revoice = new Revoice("the-token-of-your-bot");
const connection = await revoice.join("the-voice-channel-id");
const media = new MediaPlayer();
connection.on("join", () => {
  connection.play(media); // playing audio does only work after the the bot joined the voice channel

  // IMPORTANT: If you want to hear music,
  // you have to call connection.play(media)
  // BEFORE you start playing something in the media player

  media.playFile("./assets/some-nice-song.mp3");
  // or something like the following:
  media.playStream(fs.createReadStream("./assets/some-nice-song.mp3"));

  // you don't have to store the voice connection, you can retrieve it if you have the id of the voice channel like this:
  const con = revoice.getVoiceConnection("someChannelId");

  // ... pause it
  media.pause();

  // ... resume it later
  media.resume();
});

TODO:

  • [X] Play/Pause for the media class
  • [X] Non-voice events like UserJoined and roominfo
  • [ ] Audio Level Normalisation
  • [ ] Audio reception
  • [ ] Error Handling; Right now, you have to take care of things like stopping the music if you start to play another song while one is playing

Disclamer: I might have forgotten some things on the list and thus it might be extended. Feel free to open issues to suggest new features :)

Connect to self-hosted instances

You can pass the configuration data for revolt-api and thus connect it to a self-hosted instance. For the data you can pass, see oapi

Documentation

For the documentation, please have a look at the pages deployment: https://shadowlp174.github.io/revoice.js/docs