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 🙏

© 2024 – Pkg Stats / Ryan Hefner

jambot

v1.1.7

Published

A discord music bot, which you can run locally using your own token, for servers. No configuration required, except the login token

Downloads

91

Readme

jam-bot

A self-hosted Discord music bot. Aims to be a feature-compatible replacement for recently taken-down bots like Rythm and Groovy.

https://www.npmjs.com/package/jambot


Usage

Prerequisites

You need to have Node.js v14 LTS installed 1. This is the default version, but in case you need to have a different node version system-wide, you can install v14 for jam-bot alone by running

npm i node@v14-lts

in your terminal.

Confirm that Node.js is installed by running

node -v

Certain tracks will need ffmpeg to be decoded. A lot of systems may already have this installed, but you will need to install it yourself if you do not have it.

Installing

Once the prerequisites are satisfied, run the following commands one after the other in a terminal.

mkdir musicbot
cd musicbot
npm init -y
npm i jambot --only=prod

You can ignore these warnings


Usage

Place a javascript file named jambot.config.js (Or whatever else you like) in the musicbot folder with the following contents

const bot = require("jambot/Jambot");

global.AbortController = require("node-abort-controller").AbortController;

bot.init({
  token: "your_token_here",
  prefix: "!",
});

That's it!

Now fill the token field with your actual bot token, and the prefix field with whatever you'd like the command prefix to be (even multiple characters are fine).

Run this file with the following command:

node jambot.config.js

Add the bot to your server.

Use the !ping command in a text channel to confirm the bot is working, join a voice channel, and use !help to see all available commands. (Note that you will need to change the prefix depending on what you configured it as)

You can employ the same instance of the bot across multiple servers, but this depends on your computer's resources.


Development

Clone this repo, and install all dependencies with

git clone https://github.com/porridgewithraisins/jam-bot
cd jam-bot
npm i

Updates

You can run npm update in a terminal opened to the musicbot folder you created for the bot, to update the package if it is available.


Uninstall

There is no effect outside the musicbot folder you created for the bot. So simply deleting the folder suffices.


Known bugs

  • Description: There is a problem with the audio stream returned by ytdl on node.js v16. Relevant issue tracker : https://github.com/fent/node-ytdl-core/issues/902

    Status: Workaround implemented - Using node v14 even though discordjs complains. AbortController is also required


Bugs/Feature requests

Submit an issue in this Github repo.


Changelog

  • 1.1.6 When multiple instances of the bot are running in the same guild, bots only respond to commands sent by members it shares a voice channel with.
  • 1.1.5 Add better queue management and support ranges everywhere indexes are supported, such as in !search
  • 1.1.4 Fix youtube search issue.