Git Product home page Git Product logo

muse's Introduction

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).

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
  • โœ๏ธ Written in TypeScript, easily extendable
  • โค๏ธ Loyal Packers fan

Design Philosophy

I believe it makes much more sense to let Discord handle user permissions (whenever possible) rather than building them into a bot and adding additional complexity. Instead of only allowing users with a certain role to control Muse, Muse allows anyone who has access to its bound channel to control it. Instead of specifying the owner as a user ID in the config, Muse simply looks at the guild owner. Nah, that's stupid. It's a config option now.

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.

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, ffmpeg

  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 build (or npm run build)
  6. 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.

Advanced

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.