Coder Social home page Coder Social logo

discord-music-system's Introduction

Hey , I'm RemyK

NPMDiscord

Hello, I'm RemyK, Rémy for friends. I learned to develop by myself, and it's now a real passion for me. I love learning new things, creating new projects and sharing them with you (100% of my projects are open-source).


Talking about personal stuffs:

  • 👨🏽‍💻 French student
  • 🌱 Developer at his spare time
  • 🎵 Pianist, composer and musician
  • 🍜 Lasagna lover
  • 🔗 Climbing enthusiast (8a)


📈 My Github stats:

shwetangStats

top-langs

NOTE: 'Most Used Languages' does not indicate my skill level or something like that, it's a github metric of which languages i have the most code on github, it's a new feature of github-readme-stats


Languages and Tools

Visual Studio Code HTML5 CSS3



Visitor count


discord-music-system's People

Contributors

remyk888 avatar

Stargazers

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

Watchers

 avatar

discord-music-system's Issues

DiscordAPIError: cannot send empty message

Hi,

Everytime I run one of the commands that is in the npm package, it sends nothing.

No embeds, no messages can keeps throwing a DiscordAPIError.

The only command that works is the play command, but sends no messages.

Can I please get some help with this?

Music coammnds output does load

When I do $play it will send 3 messages saying it’s not in VC when I’m in the Voice Channel it will play but will spam chat and don’t stop at all and $stop don’t work.!

Error playing music

(node:154453) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received undefined
    at validateString (internal/validators.js:122:11)
    at Url.parse (url.js:159:3)
    at urlParse (url.js:154:13)
    at Url.resolve (url.js:667:29)
    at Object.urlResolve [as resolve] (url.js:663:40)
    at exports.getInfo (/home/projects/pwcommunity/bot-developers/pixelworld/BOT/node_modules/ytdl-core/lib/info.js:227:32)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async Map.getOrSet (/home/projects/pwcommunity/bot-developers/pixelworld/BOT/node_modules/ytdl-core/lib/cache.js:24:19)
    at async MusicBot.playQuery (/home/projects/pwcommunity/bot-developers/pixelworld/BOT/node_modules/discord-music-system-es/src/MusicBot.js:432:26)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:154453) 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:154453) [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.

Error when install the package

`PS D:\Documentos\KL\PokeFans\Base> npm install discord-music-system@latest
npm ERR! code 1
npm ERR! path D:\Documentos\KL\PokeFans\Base\node_modules@discordjs\opus
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=D:\Documentos\KL\PokeFans\Base\node_modules@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown\opus.node --module_name=opus --module_path=D:\Documentos\KL\PokeFans\Base\node_modules@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown --napi_version=7 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3 --python=C:\Users\USUARIO.windows-build-tools\python27\python.exe --msvs_version=2019' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | win32 | x64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "D:\Documentos\KL\PokeFans\Base\node_modules@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown\opus.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v88-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp http 404 https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v88-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v88-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for @discordjs/[email protected] and [email protected] (node-v88 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v88-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 2.7.15 found at "C:\Users\USUARIO.windows-build-tools\python27\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version was set from command line or npm config
npm ERR! gyp ERR! find VS - looking for Visual Studio version 2019
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - found in "C:\Program Files (x86)\Microsoft Visual Studio 14.0"
npm ERR! gyp ERR! find VS - MSBuild in "C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe"
npm ERR! gyp ERR! find VS - msvs_version does not match this version
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS valid versions for msvs_version:
npm ERR! gyp ERR! find VS - "2015"
npm ERR! gyp ERR! find VS - "C:\Program Files (x86)\Microsoft Visual Studio 14.0"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:391:20
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:42:7
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:324:7)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:376:20)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1063:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=D:\Documentos\KL\PokeFans\Base\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown\opus.node" "--module_name=opus" "--module_path=D:\Documentos\KL\PokeFans\Base\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3" "--python=C:\Users\USUARIO\.windows-build-tools\python27\python.exe" "--msvs_version=2019"
npm ERR! gyp ERR! cwd D:\Documentos\KL\PokeFans\Base\node_modules@discordjs\opus
npm ERR! gyp ERR! node -v v15.5.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
PS D:\Documentos\KL\PokeFans\Base> npm i discord-music-system
npm ERR! code 1
npm ERR! path D:\Documentos\KL\PokeFans\Base\node_modules@discordjs\opus
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=D:\Documentos\KL\PokeFans\Base\node_modules@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown\opus.node --module_name=opus --module_path=D:\Documentos\KL\PokeFans\Base\node_modules@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown --napi_version=7 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3 --python=C:\Users\USUARIO.windows-build-tools\python27\python.exe --msvs_version=2019' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | win32 | x64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "D:\Documentos\KL\PokeFans\Base\node_modules@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown\opus.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v88-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp http 404 https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v88-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(404): https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v88-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for @discordjs/[email protected] and [email protected] (node-v88 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/discordjs/opus/releases/download/v0.3.3/opus-v0.3.3-node-v88-napi-v3-win32-x64-unknown-unknown.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 2.7.15 found at "C:\Users\USUARIO.windows-build-tools\python27\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version was set from command line or npm config
npm ERR! gyp ERR! find VS - looking for Visual Studio version 2019
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - found in "C:\Program Files (x86)\Microsoft Visual Studio 14.0"
npm ERR! gyp ERR! find VS - MSBuild in "C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe"
npm ERR! gyp ERR! find VS - msvs_version does not match this version
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS valid versions for msvs_version:
npm ERR! gyp ERR! find VS - "2015"
npm ERR! gyp ERR! find VS - "C:\Program Files (x86)\Microsoft Visual Studio 14.0"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:391:20
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:42:7
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:324:7)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:376:20)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1063:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "configure" "--fallback-to-build" "--module=D:\Documentos\KL\PokeFans\Base\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown\opus.node" "--module_name=opus" "--module_path=D:\Documentos\KL\PokeFans\Base\node_modules\@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3" "--python=C:\Users\USUARIO\.windows-build-tools\python27\python.exe" "--msvs_version=2019"
npm ERR! gyp ERR! cwd D:\Documentos\KL\PokeFans\Base\node_modules@discordjs\opus
npm ERR! gyp ERR! node -v v15.5.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=D:\Documentos\KL\PokeFans\Base\node_modules@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown\opus.node --module_name=opus --module_path=D:\Documentos\KL\PokeFans\Base\node_modules@discordjs\opus\prebuild\node-v88-napi-v3-win32-x64-unknown-unknown --napi_version=7 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3 --python=C:\Users\USUARIO.windows-build-tools\python27\python.exe --msvs_version=2019' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess. (D:\Documentos\KL\PokeFans\Base\node_modules@discordjs\node-pre-gyp\lib\util\compile.js:72:20)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:376:20)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1063:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19042
npm ERR! node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "D:\Documentos\KL\PokeFans\Base\node_modules\@discordjs\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd D:\Documentos\KL\PokeFans\Base\node_modules@discordjs\opus
npm ERR! node-pre-gyp ERR! node -v v15.5.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.1.0
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\USUARIO\AppData\Local\npm-cache_logs\2021-02-04T18_23_16_572Z-debug.log` i have this error when i try to install the package

MinigetError: Status code: 404

When using the play command I get the following error:

2021-06-25T11:43:47.771719+00:00 app[worker.1]: MinigetError: Status code: 404
2021-06-25T11:43:47.771777+00:00 app[worker.1]: at ClientRequest. (/app/node_modules/miniget/dist/index.js:210:27)
2021-06-25T11:43:47.771778+00:00 app[worker.1]: at Object.onceWrapper (events.js:482:26)
2021-06-25T11:43:47.771778+00:00 app[worker.1]: at ClientRequest.emit (events.js:375:28)
2021-06-25T11:43:47.771779+00:00 app[worker.1]: at HTTPParser.parserOnIncomingClient (_http_client.js:647:27)
2021-06-25T11:43:47.771779+00:00 app[worker.1]: at HTTPParser.parserOnHeadersComplete (_http_common.js:126:17)
2021-06-25T11:43:47.771780+00:00 app[worker.1]: at TLSSocket.socketOnData (_http_client.js:515:22)
2021-06-25T11:43:47.771780+00:00 app[worker.1]: at TLSSocket.emit (events.js:375:28)
2021-06-25T11:43:47.771781+00:00 app[worker.1]: at addChunk (internal/streams/readable.js:290:12)
2021-06-25T11:43:47.771781+00:00 app[worker.1]: at readableAddChunk (internal/streams/readable.js:265:9)
2021-06-25T11:43:47.771782+00:00 app[worker.1]: at TLSSocket.Readable.push (internal/streams/readable.js:204:10)
2021-06-25T11:43:47.771782+00:00 app[worker.1]: at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23) {
2021-06-25T11:43:47.771782+00:00 app[worker.1]: statusCode: 404
2021-06-25T11:43:47.771783+00:00 app[worker.1]: }

Pming to bot doesnt work

hey
I want to implement a note system in my own bot, but you have written some code in your bot that blocks that. Is there an option to turn this off?

Bot leaves vc

bot just joins VC when it says that its playing music and just leaves doing nothing,

Cannot send an empty message error

Hi there, I am trying to use the module, but when I use any command, it returns an error saying it cannot send an empty message. Here is the error:

0|index  |     at RequestHandler.execute (/root/task-manager/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
0|index  |     at processTicksAndRejections (internal/process/task_queues.js:93:5)
0|index  |     at async RequestHandler.push (/root/task-manager/node_modules/discord.js/src/rest/RequestHandler.js:39:14) {
0|index  |   method: 'post',
0|index  |   path: '/channels/820023291866775662/messages',
0|index  |   code: 50006,
0|index  |   httpStatus: 400
0|index  | } ```

And here is my code:

```index.js```:
```const { MusicBot } = require('discord-music-system');

tm.musicBot = new MusicBot(tm, {
    ytApiKey: 'XXX',
    prefix: '.tm music ', // Your bot prefix
    language: 'en' // fr, en, es, pt
});

tm.on("message", async receivedMessage => {
  //console.log(receivedMessage)
  if (!receivedMessage.guild) return;
  //if (receivedMessage.author == tm.user) return;
  if (receivedMessage.author.bot) return;
  //if(receivedMessage.mentions.users.size)
  if (receivedMessage.channel.id == "826569085961633822") {
    try {
      let commandFile = require(`./commands/artContest.js`);
      commandFile.run(receivedMessage, tm, perms, flags);
    } catch (err) {
      console.log(err);
      if (err.code === "MODULE_NOT_FOUND") {
        return;
      }
    }
  }
  var check = receivedMessage.content.substr(0, 3);
  if (check.toLowerCase() == ".tm") processRoles(receivedMessage);
  try {
    let commandFile = require(`./events/message.js`);
    commandFile.run(receivedMessage, tm, perms, flags);
  } catch (err) {
    console.log(err);
    if (err.code === "MODULE_NOT_FOUND") {
      return;
    }
  }
});```

```music.js```
```var botdata = require("../mdata.js");
const db = require("quick.db");
const Canvacord = require("canvacord");
const Discord = require("discord.js");
var funcs = require("../functions.js");
const { MusicBot } = require('discord-music-system');


exports.run = async (r, a, tm, perms, flags) => {
	tm.musicBot.onMessage(r);
}```

I am passing the message correctly, but it is saying that it cannot send an empty message. I updated the module to the latest and it still says it is wrong. 

Music dont add to queue

The system doesnt add the music to the queue when i add more songs, it says the player has been created again and stops the music and starts the other

The bot playing music but there is no queue

<rejected> TypeError: Cannot read property 'username' of null
      at MusicBot.playSong (/home/runner/Hanayaa/node_modules/discord-music-system/src/MusicBot.js:594:495)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (internal/process/task_queues.js:97:5)
} reason:  TypeError: Cannot read property 'username' of null
    at MusicBot.playSong (/home/runner/Hanayaa/node_modules/discord-music-system/src/MusicBot.js:594:495)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

The weird thing is, this only happen in my second bot, in my first bot there is no error at all.
This is the code of my second bot:

const { Client } = require('discord.js'), client = new Client();
const { MusicBot } = require('discord-music-system');

module.exports = {
name: 'play',
aliases: [
          'add', 'join',
          'stop', 'kill', 'destroy', 'leave',
          'np', 'nowplaying', 'current',
          'skip', 'next',
          'queue', 'list', 'show',
          'volume', 'setvolume',
          'pause', 'resume',
          'remove', 'delete',
          'lyrics'
         ],
async execute(message, prefix) {

  client.musicBot = new MusicBot(client, {
    ytApiKey: process.env.YTAPI,
    prefix: prefix.toLowerCase(),
    language: 'en'
  });

  let theRole = message.guild.roles.cache.find(role => role.name === 'Staff Team');
  if (!theRole) return message.channel.send('The **Staff Team** role is not existed.');

  if (!message.member.roles.cache.has(theRole.id)) {
    message.channel.send('This command is only avaiable for the **Staffs**.');
  } else {
    client.musicBot.onMessage(message);
  }

}
}

Note: My first bot using the code same like in the npm example

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.