Giter Club home page Giter Club logo

muse's Introduction

๐Ÿšจ: 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.

Warning

Even if you don't plan on using Spotify, you must still provide the client ID and secret; otherwise Muse will not function.

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 (18.17.0 or later is required and latest 18.x.x LTS is recommended)
  • 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.

SponsorBlock

Muse can skip non-music segments at the beginning or end of a Youtube music video (Using SponsorBlock). It is disabled by default. If you want to enable it, set the environment variable ENABLE_SPONSORBLOCK=true or uncomment it in your .env. Being a community project, the server may be down or overloaded. When it happen, Muse will skip requests to SponsorBlock for a few minutes. You can change the skip duration by setting the value of SPONSORBLOCK_TIMEOUT.

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.

muse's People

Contributors

aronjanosch avatar bokherus avatar codetheweb avatar codingkoopa avatar coryjreid avatar dependabot-preview[bot] avatar dependabot[bot] avatar drowningwhale avatar drunkentoast avatar foxxmd avatar fuji97 avatar hellysonrp avatar j7126 avatar kkendzia avatar likuilin avatar luisfavila avatar marcocoreduo avatar mintyfreshers avatar ninele7 avatar pierluigizagaria avatar pondpiu avatar rblaine95 avatar reynard-g avatar serpentdrago avatar sheeley7 avatar sonroyaalmerol avatar therithwikrayani avatar xenomer avatar xhyperelectric avatar zagrthos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

muse's Issues

Possible EventEmitter memory leak detected.

After letting the bot running for a while it gets slower and eventually it prints the following message to the console:

(node:2780) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 disconnect listeners added to [VoiceConnection]. Use emitter.setMaxListeners() to increase limit
(Use node --trace-warnings ... to show where the warning was created)
(node:2780) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit

When that happens, the bot becomes unresponsive and only works again after a restart.

The bot is on 4 guilds andI'm running this it on a raspberrypi 4b which isn't a very powerfull hardware, but it should've been more than enough to run a discord bot. It has a good high speed internet connection and is running on the latest node version.

Playlists are not fully loaded

After this commit, youtube playlists are not fully loaded anymore.

Cause

The issue is caused by this block of code:

const {items: videoDetailItems} = await this.cache.wrap(
async () => got(
'https://www.googleapis.com/youtube/v3/videos',
{
searchParams: {
part: 'contentDetails',
id: items.map(item => item.contentDetails.videoId).join(','),
key: this.youtubeKey,
responseType: 'json',
},
},
).json() as Promise<{items: VideoDetailsResponse[]}>,
{
expiresIn: ONE_MINUTE_IN_SECONDS,
},
);

The cache implementation gets its key from the options passed as arguments to the function (except the last, that contains the expiresIn), but there is no arguments passed to the function, resulting in the key [].

bot joins but music don't work

I got the bot to work and joining into my server but the moment I send a play command to him he just joins the call, prints in chat the song he is going to play and nothing happens, I have ffmpeg installed and I got it to work with node.js

this is the error printed in git bash

image

Type errors when building...

Following the build steps, and when I get to "npm run build" I get the following error:


> [email protected] build /root/muse
> tsc

src/utils/loading-message.ts:23:11 - error TS7034: Variable 'reactions' implicitly has type 'any[]' in some locations where its type cannot be determined.

23     const reactions = [];
             ~~~~~~~~~

src/utils/loading-message.ts:42:36 - error TS7005: Variable 'reactions' implicitly has an 'any[]' type.

42           const reactionToRemove = reactions.shift();
                                      ~~~~~~~~~


Found 2 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: `tsc`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2021-09-13T16_35_26_632Z-debug.log
root@discord-music-bot:~/muse #

Any suggestions?

Control volume level

I would love a way to control the default volume of the bot.
So when the bot gets in blasting music it stays a low volume and don't disturb the people already speaking.

Problems with running

Hi, I've run the docker command, but I get this error:
image

I've made sure that the client and secret id are correct. Is there something I'm missing?

that doesnt exist (spotify and youtube)

I'm still seeing the same issues even after updating to the new Docker container.

Is there logs somewhere that I can post or view to try to figure out what's going on?

Thanks!

Support for web streaming audio files

Howdy howdy, just wanna say this bot is great! Thanks, Google. ๐Ÿฅฒ

Anywho, one of the bots we used in the past had support for HTTP-streaming(?) audio files. Our exact use-case were the Nightride stations. Example links (names and extensions are interchangeable): https://nightride.fm/stream/rektory.m4a , https://nightride.fm/stream/nightride.mp3 , .ogg also works.

However, with Muse, it just replies with "๐Ÿšซ no songs found"

Is there a chance this support can be added? Thanks

DiscordAPIError: Invalid Form Body when playing music

This issue has been ongoing for a week or more and started suddenly. My initial reaction was that discord changed something in the API, but given there has been no other discussion regarding this here mayhap something else is going on.

Process:
start the bot
play a song
receive error below

(node:3054) UnhandledPromiseRejectionWarning: DiscordAPIError: Invalid Form Body
content: Must be 2000 or fewer in length.
    at RequestHandler.execute (/home/daenks/muse/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async RequestHandler.push (/home/daenks/muse/node_modules/discord.js/src/rest/RequestHandler.js:39:14)
    at async Client.<anonymous> (file:///home/daenks/muse/dist/bot.js:86:17)
(node:3054) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:3054) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

The same error occurs regardless of audio source.
I build the latest master as of a few minutes ago and the problem persists for me.

Spotify API failure

Console Log after trying to start with docker

yarn run v1.22.5 $ node dist/index.js (node:29) UnhandledPromiseRejectionWarning: WebapiAuthenticationError: An authentication error occurred while communicating with Spotify's Web API. Details: invalid_client Invalid client. at _toError (/usr/app/node_modules/spotify-web-api-node/src/http-manager.js:43:12) at /usr/app/node_modules/spotify-web-api-node/src/http-manager.js:71:25 at Request.callback (/usr/app/node_modules/superagent/lib/node/index.js:905:3) at /usr/app/node_modules/superagent/lib/node/index.js:1127:20 at IncomingMessage.<anonymous> (/usr/app/node_modules/superagent/lib/node/parsers/json.js:22:7) at Stream.emit (events.js:400:28) at Unzip.<anonymous> (/usr/app/node_modules/superagent/lib/node/unzip.js:53:12) at Unzip.emit (events.js:400:28) at endReadableNT (internal/streams/readable.js:1317:12) at processTicksAndRejections (internal/process/task_queues.js:82:21) (Use node --trace-warnings ...to show where the warning was created) (node:29) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:29) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode

I have no clue how the spotify api works but it seemes to be the problem here?

So i just created a new app on the spotify Dashboard and added the ID and secret. tried this multiple times.

Spotify Token Timeout

image
I'm getting this error after an hour (when the token expires). Honestly, I tried my hand at it but I'm too noob to figure this one out LMAO.

error when trying to invite the bot

When I use the docker command and copy the invitation link, i get an error message telling me that "client_id: Value "" is not a snowflake."
Capture

that doesn't exist (increase daily song query limit on YT)

Hey! I've been enjoying the bot you've made and it worked near flawlessly for a few song searches before completely stopping top result searches. It will only respond with "that doesn't exist".

I've tried for an hour or two now with various restarts / reimplementations but haven't been able to replicate my initial success with the searches. I believe the issue lies with pulls from Youtube that aren't a direct link, as Spotify playlists have also stopped being played, even when it adds them to the queue.

Do you have any ideas on how I could go about fixing this? There's a good chance something just flew over my head, but I'm curious as to where I would've went wrong as well! Thanks!

Implement new caching solution

I'm opening this issue to share feedback about the current song caching implementation.

My Environment

It may be relevant to know my environment to understand the issue.
I run this bot in a virtualized environment, using xcp-ng and an Alpine Linux VM, manually configured.
The VM specs are as follow:

  • 1.5 GB of RAM (waaaay too much, I'll reduce that later)
  • 1 vCPU 3.80 GHz
  • 10 GB of SSD storage space (effective storage space is lower, about 7 GB)

My thoughts about the song caching implementation

  • It uses all the available disk space
  • It doesn't clean up old entries

If the disk space runs out, the bot dies.

In my opinion, a nice cache system should have a configurable maximum size, and should detect if the disk is full (or if the maximum size is reached) and delete the least used cache file(s) to free up space.

I know it's not trivial to implement something like this, especially when the bot is used in more than one guild simultaneously, but with the current implementation, I have to manually clear the cache files now and then to keep the bot working.

IMHO something must be changed to avoid this problem. It doesn't need to be implemented in the way that I think it should, but also the bot must not die from lack of disk space.

Thank you for your time.

node.js help

i apologize for the inexperience, what exactly do i do at this step?

Copy .env.example to .env and populate with values

A little help needed

Hi

The installation was well documented and worked great.

Now I want to actually use the bot but I'm having a little trouble.

  • Whats the default prefix?
  • Can I change the prefix and how?
  • Is there a !help or !command where I can see all the commands?

Thanks in advance!

ESlint config

Could we get the ESlint config uploaded to the repo in order to have PRs properly linted?

error when running docker

When I run the docker command it does all the pulls and then it gives me this error:

docker: Error response from daemon: create $(pwd)/data: "$(pwd)/data" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path. See 'docker run --help'.

I'm pretty new to this stuff so it's probably user error, I appreciate any help given.

Remove songs from queue

Command to remove songs from a queue.
e.g.: !remove 3, !rm 2, !rm 6-9

Made this for myself, will make PR.

Better error handling

Currently a lot of errors aren't handled properly. By this I mean that the full error is never logged, regardless of the cause, and Muse posts a generic message in response.

Bot will always join most popular channel, even if connected to different channel

In a server with multiple VCs ($popular-vc and $connected-vc):

$popular is a Voice Channel with many users
$connected-vc is the Voice Channel the requestor is connected to, with less users than $popular-vc

Muse will always connect to the most popular VC, even if the requestor is connected to a different VC. This makes it quite annoying when running multiple instances on the same guild, as all of the music player bots end up connecting to the same VC, even if they are requested from different bound channels by different users. What I would normally expect is for the bot to bind to the same VC as the user that requested the music, even if they are connected to a less popular channel.

Would it be possible to force the bot to connect to the VC that the requestor user is connected to (i.e. the VC that the user that entered the !play command in chat is connected to)?

Localization support

I'm opening this issue more as a discussion/proposal to see how you'd feel about that

Since it's a self-hosted bot I was thinking it would be pretty cool to be able to change the messages it sends, either to translate them or just as a customization option.

So I did a little work and implemented a very bare bones solution, but before moving forward I'd like to hear your thoughts about it :D

Running

tried to execute this on Node.js "git clone https://github.com/codetheweb/muse.git && cd muse" and got syntax error.
Then i tried to execute on Git CMD and it went ok however the running problem still here, same on docker.
image

Add tests

This is especially important as more people start contributing and refactoring code.

I don't currently see myself having enough time anytime soon to implement this, so as always happy to accept PRs. ๐Ÿ˜„

I'm personally a fan of Ava.

โŒ no songs found

Hey Codetheweb,

I think I'm getting the same error as one of the other issues (315) where It won't play any more links, when I checked the GCP it says that error with the 10k cap.
Screen Shot 2021-09-18 at 10 35 16 PM

I was wondering if you can add ytsr to put less strain on the youtube API limit.

If you pause and unpause, the music is unpaused but bot is quiet

If you pause and unpause any music, internally the music will be playing, but the bot will not play anything in the voice channel.
Pausing and unpausing again, or disconnecting and reconnecting the bot, makes it play the music normally again.
Here is a GIF demonstrating the behavior:

pause-bug

I'm using the latest docker version.

stop command

I tested this bot now for a while on different servers, but one thing is a bit annoying: the missing stop command. This would generally just tell the bot to leave the voice chat and clear the whole queue. But this bot is still a very good alternative to the other big bots :D

Initial Bot Invite Perms

Instead of dm'ing the owner on invite just send a message in the welcome channel with commands to set the prefix and text channel. I had to change the data location a few times when I switched to this bot and it spammed people every time I moved it.

GPG Signed commits

@udany submitted two PRs I've been excited for (#322 and #325) but it's been over a week since the PR was made without any indication that they would be signed. Is there anyway for these PRs to be signed and merged?

Unexpected behavior when adding a song to the queue

If you have a song originated from a playlist in the back of the queue (i.e. have already listened to it) and try to add any other song to the playlist, the song will be added in a position related to the position of the first song from a playlist in the queue. If the song from the playlist is the first song of the queue (of all songs, not just what is shown in the queue command), the new song will be added immediately after the current song; if it is the second on the queue, the new song will be added after the next song, and so on.
This behavior is exemplified in this poorly made GIF:

add-song-behavior

The cause of this behavior is this piece of code:

muse/src/services/player.ts

Lines 236 to 253 in a4e67d6

} else {
// Not from playlist, add immediately
let insertAt = this.queuePosition + 1;
if (!immediate) {
// Loop until playlist song
this.queue.some(song => {
if (song.playlist) {
return true;
}
insertAt++;
return false;
});
}
this.queue = [...this.queue.slice(0, insertAt), song, ...this.queue.slice(insertAt)];
}

In my own instance of the bot, I've replaced this piece of code with this:

    } else {
      debug(`adding song - ${String(immediate)} - ${song.title}`);
      if (immediate) {
        const insertAt = this.queuePosition + 1;
        this.queue = [...this.queue.slice(0, insertAt), song, ...this.queue.slice(insertAt)];
      } else {
        this.queue.push(song);
      }
    }

I did not open a PR, however, because I don't know what the expected behavior is.
Why was that loop added in the first place?

Bot randomly stops streaming audio

When playing audio from youtube, I found the bot will randomly stop streaming the audio into the voice channel. When this happens the bot will stay in the channel and sending the queue command shows the time stamp continuing to increase. I've found this is repeatable for long (50 minutes) videos, though has occasionally happened on much shorter videos as well.

After searching for the issue, I think it is the result of some dynamic between ffmpeg and fs-capacitor, where ffmpeg fills fs-capacitor buffer and subsequently will stop writing to the buffer. This is followed by the read stream catching up and stopping as a result of no new data being added into the buffer.

Troubleshooting this, I found added '-re' to the ffmpegInputOptions resolved the issue. This seems to align with FFmpeg's streaming guide.

With this change it also seems like the fs-capacitor can be removed as a dependency, but I am not sure the role it plays in this code.

Implement slash (/) commands

As title says, implement slash commands instead of using the <prefix> command [...params] message format.


After final implementation the bot should check if guild already has the prefix setting stored in guild settings; if present handle the "prefix commands" and slash commands; if not, only handle slash commands.

This will allow to keep the old setups running without changing the behavior that the users are used to.

Channel selection via reactions

While it sounds neat it's actually rather bad - in my opinion - for the following reasons:

  1. Why even bother implementing such system when there are permissions. The guild administrators should setup permissions for the bot role if they want to restrict the bot to have access only to specific channels
  2. It's just another thing that can (and does) break
    2.1. Not all icons (reactions) used are implemented by Discord (see attachment bellow)

The "eye" icon (๐Ÿ‘๏ธโ€๐Ÿ—จ๏ธ) is not implemented by Discord, so it can not be added as a reaction.
image


I propose that the "select your channel" implementation is scrapped (left implemented so the current setups still keep working as they are intended to), but the setup process is removed and channel checking is ignored in future installations.

eg.

- Bot startup
- check datastore
  - get guild settings
- message is handled
  - is command
  - is guild setting channel present?
    - yes: check if command is in that channel
      - is in channel: continue
      - is not in channel, return;
    - no: continue;

This is also related to #331 which aims to remove the prefix setting from setup. With both issues resolved and features being implemented, the setup process will be simpler (eg. no bot-specific setup) and will make the usage more fluent.

Running on windows

In case anyone else is having the same struggle as me:

I had trouble figuring out how to get this running because there's no "installer" for ffmpeg on windows - it's just a zip of files...
But if ffmpeg isn't "installed" on your system I found that you can tell the node libraries where to find by setting the FFMPEG_PATH environment variable before starting node:

SET FFMPEG_PATH=C:\whatever\ffmpeg\bin\ffmpeg.exe
npm run start

DiscordAPIError

After building the app the logs return a few errors and warnings. The bot is not responding to commands.

Muse

Muse2

I built the app in docker compose so I double checked the docker-compose.yml for typos in all the API keys, tokens, and client ID's.
Any help resolving this issue would be much appreciated.

Bot gets stuck if video is not available

If you have a playlist with an unavailable video, an unhandled promise rejection occurs and the bot gets stuck. If the music is skipped, everything goes back to normal.

Here is an example:
Screenshot_11

After the current music ends, this happens:

Screenshot_12

I'm using the docker version, got it yesterday (d5bc0089b5bc).
This is what is in the console:

# docker-compose up
Starting muse_muse_1 ... done
Attaching to muse_muse_1
muse_1  | yarn run v1.22.5
muse_1  | $ node dist/index.js
muse_1  | Ready! Invite the bot with https://discordapp.com/oauth2/authorize?client_id=383336399572828172&scope=bot&permissions=36760640
muse_1  | WARNING: ytdl-core is out of date! Update with "npm install ytdl-core@latest".
muse_1  | Error: Output stream closed
muse_1  |     at Timeout._onTimeout (/usr/app/node_modules/fluent-ffmpeg/lib/processor.js:491:25)
muse_1  |     at listOnTimeout (internal/timers.js:557:17)
muse_1  |     at processTimers (internal/timers.js:500:7)
muse_1  | Error: Output stream closed
muse_1  |     at Timeout._onTimeout (/usr/app/node_modules/fluent-ffmpeg/lib/processor.js:491:25)
muse_1  |     at listOnTimeout (internal/timers.js:557:17)
muse_1  |     at processTimers (internal/timers.js:500:7)
muse_1  | (node:27) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit
muse_1  | (Use `node --trace-warnings ...` to show where the warning was created)
muse_1  | (node:27) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 disconnect listeners added to [VoiceConnection]. Use emitter.setMaxListeners() to increase limit
muse_1  | Error: Output stream closed
muse_1  |     at Timeout._onTimeout (/usr/app/node_modules/fluent-ffmpeg/lib/processor.js:491:25)
muse_1  |     at listOnTimeout (internal/timers.js:557:17)
muse_1  |     at processTimers (internal/timers.js:500:7)
muse_1  | (node:27) UnhandledPromiseRejectionWarning: Error: Status code: 410
muse_1  |     at ClientRequest.<anonymous> (/usr/app/node_modules/miniget/dist/index.js:210:27)
muse_1  |     at Object.onceWrapper (events.js:520:26)
muse_1  |     at ClientRequest.emit (events.js:400:28)
muse_1  |     at HTTPParser.parserOnIncomingClient (_http_client.js:647:27)
muse_1  |     at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
muse_1  |     at TLSSocket.socketOnData (_http_client.js:515:22)
muse_1  |     at TLSSocket.emit (events.js:400:28)
muse_1  |     at addChunk (internal/streams/readable.js:290:12)
muse_1  |     at readableAddChunk (internal/streams/readable.js:265:9)
muse_1  |     at TLSSocket.Readable.push (internal/streams/readable.js:204:10)
muse_1  |     at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
muse_1  | (node:27) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
muse_1  | (node:27) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
muse_1  | Error: Output stream closed
muse_1  |     at Timeout._onTimeout (/usr/app/node_modules/fluent-ffmpeg/lib/processor.js:491:25)
muse_1  |     at listOnTimeout (internal/timers.js:557:17)
muse_1  |     at processTimers (internal/timers.js:500:7)
muse_1  | (node:27) UnhandledPromiseRejectionWarning: Error: Status code: 410
muse_1  |     at ClientRequest.<anonymous> (/usr/app/node_modules/miniget/dist/index.js:210:27)
muse_1  |     at Object.onceWrapper (events.js:520:26)
muse_1  |     at ClientRequest.emit (events.js:400:28)
muse_1  |     at HTTPParser.parserOnIncomingClient (_http_client.js:647:27)
muse_1  |     at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
muse_1  |     at TLSSocket.socketOnData (_http_client.js:515:22)
muse_1  |     at TLSSocket.emit (events.js:400:28)
muse_1  |     at addChunk (internal/streams/readable.js:290:12)
muse_1  |     at readableAddChunk (internal/streams/readable.js:265:9)
muse_1  |     at TLSSocket.Readable.push (internal/streams/readable.js:204:10)
muse_1  |     at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
muse_1  | (node:27) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

The error happened two times.

Great bot BTW ๐Ÿ˜„
Now that Google is killing almost all the other music bots, selfhosting will become more and more common IMHO.

A little help make it running?

whenever i try to run the bot this appears:
Running on windows 10, node version 12.13 (downgraded because the newer version do not build @discordjs/opus properly)

C:\Users\geral\Desktop\Bot-main\muse-master>set ffmpeg_path=C:\ffmpeg\bin\ffmpeg.exe

C:\Users\geral\Desktop\Bot-main\muse-master>npm run start

[email protected] start C:\Users\geral\Desktop\Bot-main\muse-master
node dist/index.js

C:\Users\geral\Desktop\Bot-main\muse-master\dist\index.js:1
import makeDir from 'make-dir';
^^^^^^

SyntaxError: Cannot use import statement outside a module
at Module._compile (internal/modules/cjs/loader.js:892:18)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14)
at Function.Module.runMain (internal/modules/cjs/loader.js:1025:10)
at internal/main/run_main_module.js:17:11
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: node dist/index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\geral\AppData\Roaming\npm-cache_logs\2021-10-04T17_27_29_260Z-debug.log

C:\Users\geral\Desktop\Bot-main\muse-master>

SoundCloud support

Support SoundCloud as well along with YouTube and Spotify.
YouTube-dl already supports SoundCloud the same way as YouTube.

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.