• Stars
    star
    782
  • Rank 58,164 (Top 2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 4 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🎧 a self-hosted midwestern Discord music bot that doesn't suck

🚨: v1.0.0 was a breaking change. Please take a look at the release notes for upgrade instructions


Muse is a highly-opinionated midwestern self-hosted Discord music bot that doesn't suck. It's made for small to medium-sized Discord servers/guilds (think about a group the size of you, your friends, and your friend's friends).

Hero graphic

Features

  • πŸŽ₯ Livestreams
  • ⏩ Seeking within a song/video
  • πŸ’Ύ Local caching for better performance
  • πŸ“‹ No vote-to-skip - this is anarchy, not a democracy
  • ↔️ Autoconverts playlists / artists / albums / songs from Spotify
  • ↗️ Users can add custom shortcuts (aliases)
  • 1️⃣ Muse instance supports multiple guilds
  • πŸ”Š Normalizes volume across tracks
  • ✍️ Written in TypeScript, easily extendable
  • ❀️ Loyal Packers fan

Running

Muse is written in TypeScript. You can either run Muse with Docker (recommended) or directly with Node.js. Both methods require API keys passed in as environment variables:

  • DISCORD_TOKEN can be acquired here by creating a 'New Application', then going to 'Bot'.
  • SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET can be acquired here with 'Create a Client ID'.
  • YOUTUBE_API_KEY can be acquired by creating a new project in Google's Developer Console, enabling the YouTube API, and creating an API key under credentials.

Muse will log a URL when run. Open this URL in a browser to invite Muse to your server. Muse will DM the server owner after it's added with setup instructions.

A 64-bit OS is required to run Muse.

Versioning

The master branch acts as the developing / bleeding edge branch and is not guaranteed to be stable.

When running a production instance, I recommend that you use the latest release.

🐳 Docker

There are a variety of image tags available:

  • :2: versions >= 2.0.0
  • :2.1: versions >= 2.1.0 and < 2.2.0
  • :2.1.1: an exact version specifier
  • :latest: whatever the latest version is

(Replace empty config strings with correct values.)

docker run -it -v "$(pwd)/data":/data -e DISCORD_TOKEN='' -e SPOTIFY_CLIENT_ID='' -e SPOTIFY_CLIENT_SECRET='' -e YOUTUBE_API_KEY='' codetheweb/muse:latest

This starts Muse and creates a data directory in your current directory.

Docker Compose:

version: '3.4'

services:
  muse:
    image: codetheweb/muse:latest
    restart: always
    volumes:
      - ./muse:/data
    environment:
      - DISCORD_TOKEN=
      - YOUTUBE_API_KEY=
      - SPOTIFY_CLIENT_ID=
      - SPOTIFY_CLIENT_SECRET=

Node.js

Prerequisites:

  • Node.js (16.x is recommended because it's the current LTS version)
  • ffmpeg (4.1 or later)
  1. git clone https://github.com/codetheweb/muse.git && cd muse
  2. Copy .env.example to .env and populate with values
  3. I recommend checking out a tagged release with git checkout v[latest release]
  4. yarn install (or npm i)
  5. yarn start (or npm run start)

Note: if you're on Windows, you may need to manually set the ffmpeg path. See #345 for details.

βš™οΈ Additional configuration (advanced)

Cache

By default, Muse limits the total cache size to around 2 GB. If you want to change this, set the environment variable CACHE_LIMIT. For example, CACHE_LIMIT=512MB or CACHE_LIMIT=10GB.

Custom Bot Status

In the default state, Muse has the status "Online" and the text "Listening to Music". You can change the status through environment variables:

  • BOT_STATUS:

    • online (Online)
    • idle (Away)
    • dnd (Do not Disturb)
  • BOT_ACTIVITY_TYPE:

    • PLAYING (Playing XYZ)
    • LISTENING (Listening to XYZ)
    • WATCHING (Watching XYZ)
    • STREAMING (Streaming XYZ)
  • BOT_ACTIVITY: the text that follows the activity type

  • BOT_ACTIVITY_URL If you use STREAMING you MUST set this variable, otherwise it will not work! Here you write a regular YouTube or Twitch Stream URL.

Examples

Muse is watching a movie and is DND:

  • BOT_STATUS=dnd
  • BOT_ACTIVITY_TYPE=WATCHING
  • BOT_ACTIVITY=a movie

Muse is streaming Monstercat:

  • BOT_STATUS=online
  • BOT_ACTIVITY_TYPE=STREAMING
  • BOT_ACTIVITY_URL=https://www.twitch.tv/monstercat
  • BOT_ACTIVITY=Monstercat

Bot-wide commands

If you have Muse running in a lot of guilds (10+) you may want to switch to registering commands bot-wide rather than for each guild. (The downside to this is that command updates can take up to an hour to propagate.) To do this, set the environment variable REGISTER_COMMANDS_ON_BOT to true.

More Repositories

1

tuyapi

🌧 An easy-to-use API for devices that use Tuya's cloud services. Documentation: https://codetheweb.github.io/tuyapi.
JavaScript
2,054
star
2

aoede

🎧 a self-hosted Spotify β†’ Discord music bot
Rust
285
star
3

anylist

πŸ“‹ a wrapper for AnyList's API (unoffical, reverse engineered)
JavaScript
85
star
4

dialogflow-to-discord

Easily add Discord bot integration to your Dialogflow project
JavaScript
18
star
5

placed

a viewer for /r/place
Rust
17
star
6

serverless-step-functions-local

Run AWS step functions offline with Serverless
JavaScript
16
star
7

homebridge-tuya-outlet

A plugin for Homebridge for Tuya-based outlets
JavaScript
15
star
8

MMM-AnyList

Magic Mirror module to display AnyList data
JavaScript
11
star
9

literature-clock

Returns a random quote containing the passed time.
JavaScript
6
star
10

Pigeon

Web interface for GRIP
JavaScript
3
star
11

mtu-webcams

πŸ“· 🚨 an easy-to-use API for downloading and streaming from public Michigan Tech webcams
JavaScript
3
star
12

librespot-node

Rust
3
star
13

portfolio

🎨 source for maxisom.me
TypeScript
3
star
14

Spong

🍴+ πŸ₯„ + 🎡 App to show the currently playing song on Spotify. Made for big displays at parties and events.
JavaScript
2
star
15

stepfunctions-localhost

JavaScript
1
star
16

ifttt-bluetooth-proximity

A script to add Bluetooth proximity detection to IFTTT flows
JavaScript
1
star
17

buzzzer

A web buzzer (for Jeopardy, etc.). Made for Wonderhack 2019.
CSS
1
star
18

relacation

Quick demo to show seeding of the Math.random() function with a user's location
HTML
1
star
19

tothemoonbitcoin

πŸš€ to the πŸŒ”!
CSS
1
star
20

substr-occurrence

A small library that counts the number of occurrences of a substring
JavaScript
1
star
21

homebridge-yamaha-scene

Turns on and off a Yamaha AV receiver and set it to a scene
JavaScript
1
star
22

codetheweb

1
star
23

dominos-api

πŸ•
JavaScript
1
star
24

nodesplash

🌊 port of qdm12/gosplash to TypeScript
TypeScript
1
star
25

Tradmill

A new & fresh wireless treadmill controller
CSS
1
star
26

gh-action-issue-parser

βš™οΈ action that runs issue-parser and provides the output
TypeScript
1
star
27

palmdoc-compression

Fast & safe implementation of Kindle/PalmDoc flavored LZ77
Rust
1
star