Coder Social home page Coder Social logo

whatsapp-music-bot's Introduction

Whatsapp music bot

WhatsApp Music Bot v3

now for Multidevices!

GitHub top language GitHub language count Repository size GitHub last commit Repository issues GitHub

Info   |    Technologies   |    How to   |    Functionalities   |    Contribute   |    License

Web Gif Web Gif

🚀 Info

Your whatsapp becomes a music bot!. You can send music's to your friend's private conversation or in your gropus just sending !play SONG_NAME where SONG_NAME is the name of the song you are looking for!

WARNING: this bot is not hosted. You need to host it by yourself

💻 Technologies

This project was developed following this technologies:

ℹ️ How To

installation_vid.mp4

To clone this application you will need Git + Node.js v16 or higher + Yarn v1.22.4 or higher installed in your computer. Run in terminal:

# Clone this repo
$ git clone https://github.com/mlg404/whatsapp-music-bot.git whatsapp-music-bot

# Access this repo
$ cd whatsapp-music-bot

# Install dependencies with yarn
$ yarn install

# Run the application with yarn (or npm run dev)
$ yarn start

See available langs in `src/language.ts`. Configure your language in `config.ts` file:
export const LANGUAGE = 'br'; // brazilian portuguese

// or

export const LANGUAGE = 'en'; // english

After script run, you need to scan the QrCode in your terminal with your whatsapp! (Same proccess to join whatsapp web)

🔎 Functionalities

See the current features!

  • Search a song directly from youtube;
  • Songs once searched are downloaded for optimized next searches;
  • Send songs in private or in groups;
  • Your friends can send the command too;
  • You can enable the "Download progress";
  • Prevents downloading videos more than MAX DURATION minutes long.
  • New command's system
  • Help command

🌠 Upcoming features

  • New error handling
  • Redesigned music cache

👥 Contribute

  • Fork this repository;
  • Create one branch with your feature: git checkout -b my-feature;
  • Commit your alterations: git commit -m 'feat: My new feature';
  • Push to your branch: git push origin my-feature.

Open a pull request with your branch. After pull request merge, you should delete your branch.
We need some translations too! Look for language.ts file! It's so easy!

📝 License

This project is under MIT license. See LICENSE for more information.


Made with 💙 by Victor Eyer 👋 Get in touch!

whatsapp-music-bot's People

Contributors

alexdinan avatar devamiyo avatar hugojf avatar mlg404 avatar smart-worker 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  avatar

whatsapp-music-bot's Issues

Não Instala

Já tentei de tudo instalar, mas não consigo de jeito algum
Captura de tela 2020-10-18 102120

nao encontrado, tente novamente

im receiving this message every time i type !play songname.
i console.log opts and it throws this message:
_data: { videos: [], playlists: [], channels: [] }

any idea about how to fix this issue?

note: i tried from a different ip to discard if it was a ban from youtube.

Error: spawn Unknown system error -86

darwin@Darwins-Mac-mini whatsapp-music-bot % yarn start
yarn run v1.22.21
warning ../../package.json: No license field
$ ts-node-dev --transpile-only --ignore-watch node_modules src/main.ts
[INFO] 22:16:59 ts-node-dev ver. 2.0.0 (using ts-node ver. 10.9.2, typescript ver. 4.9.5)
Error: spawn Unknown system error -86
at ChildProcess.spawn (node:internal/child_process:421:11)
at Object.spawn (node:child_process:761:9)
at BrowserRunner.start (/Users/darwin/Desktop/whatsapp-music-bot/node_modules/puppeteer/src/node/BrowserRunner.ts:89:30)
at ChromeLauncher.launch (/Users/darwin/Desktop/whatsapp-music-bot/node_modules/puppeteer/src/node/Launcher.ts:162:12)
at PuppeteerNode.launch (/Users/darwin/Desktop/whatsapp-music-bot/node_modules/puppeteer/src/node/Puppeteer.ts:155:27)
at Client.initialize (/Users/darwin/Desktop/whatsapp-music-bot/node_modules/whatsapp-web.js/src/Client.js:107:39)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
[ERROR] 22:16:59 Error: spawn Unknown system error -86

Increase 15 minute time limit

Is it possible to increase the music time limit so that the bot can download musics that are more than 15 minutes length ?

longest

Error: spawn /usr/bin/ffmpeg ENOENT

Successfully connected!

videoDetails.thumbnail.thumbnails will be removed in a near future release, use videoDetails.thumbnails instead.
Error: spawn /usr/bin/ffmpeg ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
[ERROR] 23:24:57 Error: spawn /usr/bin/ffmpeg ENOENT

if the path is wrong how I give a path
thank you

keeps crashing

everytime i try to play a song it says " app crashed - waiting for file changes before starting..."

can u help? thx

Could not find browser revision

[[22:30:38.766]] [ERROR] Error: Could not find browser revision 818858. Run "PUPPETEER_PRODUCT=firefox npm install" or "PUPPETEER_PRODUCT=firefox yarn install" to download a supported Firefox browser binary.
at ChromeLauncher.launch (E:\Github\Amiyos-WhatsApp_MusicBot\node_modules\puppeteer\lib\cjs\puppeteer\node\Launcher.js:79:23)
at Client.initialize (E:\Github\Amiyos-WhatsApp_MusicBot\node_modules\whatsapp-web.js\src\Client.js:67:25)
[ERROR] 22:30:38 Error: Could not find browser revision 818858. Run "PUPPETEER_PRODUCT=firefox npm install" or "PUPPETEER_PRODUCT=firefox yarn install" to download a supported Firefox browser binary.

MinigetError: Status code: 404

MinigetError: Status code: 404
at ClientRequest. (E:\Github\whatsapp-music-bot\node_modules\miniget\src\index.ts:257:19)
at Object.onceWrapper (node:events:472:26)
at ClientRequest.emit (node:events:365:28)
at HTTPParser.parserOnIncomingClient (node:_http_client:621:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:127:17)
at TLSSocket.socketOnData (node:_http_client:487:22)
at TLSSocket.emit (node:events:365:28)
at addChunk (node:internal/streams/readable:314:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at TLSSocket.Readable.push (node:internal/streams/readable:228:10) {
statusCode: 404 }

-------------------Fixed-------------------

Downloads simultâneos

Como faço para colocar + de 1 download simultâneo, já tentei alterar no \src\main - maxParallelDownload , porém continua baixando somente 1

Can not read property 'map' of undefined index.js:20:13

Hi bro.
Please i got this error while running the npm run dev
TypeError: Cannot read property 'map' of undefined
at C:\Users\ADEBOLA\documents\projects\index.js:20:13
at FSReqCallback.oncomplete (fs.js:171:23)
error
May Allah (SWT) bless you

Cannot read properties of undefined (reading 'features')

Hello, i have the following error every time i try to download something -

[ '.your_mp3_files_will_be_saved_here' ]
Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'features')
    at Object.window.WWebJS.sendMessage (__puppeteer_evaluation_script__:92:39)
    at __puppeteer_evaluation_script__:10:45
    at ExecutionContext._evaluateInternal (C:\Users\u\whatsapp-music-bot\node_modules\puppeteer\src\common\ExecutionContext.ts:273:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at ExecutionContext.evaluate (C:\Users\u\whatsapp-music-bot\node_modules\puppeteer\src\common\ExecutionContext.ts:140:12)
    at Client.sendMessage (C:\Users\u\whatsapp-music-bot\node_modules\whatsapp-web.js\src\Client.js:594:28)
[ERROR] 14:13:00 Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'features')
    at Object.window.WWebJS.sendMessage (__puppeteer_evaluation_script__:92:39)
    at __puppeteer_evaluation_script__:10:45

ReferenceError: webpackChunkbuild is not defined

[[20:48:13.807]] [ERROR] Error: Evaluation failed: ReferenceError: webpackChunkbuild is not defined at fillModuleArray (eval at <anonymous> (:2:5), <anonymous>:6:5) at moduleRaid (eval at <anonymous> (:2:5), <anonymous>:15:3) at __puppeteer_evaluation_script__:4:17 at ExecutionContext._evaluateInternal (E:\music\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:217:19) at processTicksAndRejections (node:internal/process/task_queues:96:5) at ExecutionContext.evaluate (E:\music\node_modules\puppeteer\lib\cjs\puppeteer\common\ExecutionContext.js:106:16) at Client.initialize (E:\music\node_modules\whatsapp-web.js\src\Client.js:148:9) [ERROR] 20:48:13 Error: Evaluation failed: ReferenceError: webpackChunkbuild is not defined at fillModuleArray (eval at <anonymous> (:2:5), <anonymous>:6:5) at moduleRaid (eval at <anonymous> (:2:5), <anonymous>:15:3) at __puppeteer_evaluation_script__:4:17

failed to start | yarn start

IMG_20210908_084118
I did everything correctly but still I got an error, I don't know what this error means but can you help me please?

Não consigo sair daqui

Sempre depois de conectar ao qrcode aparece a seguinte mensagem:

(node:18788) UnhandledPromiseRejectionWarning: TimeoutError: waiting for selector canvas failed: timeout 45000ms exceeded
at new WaitTask (C:\Users\cunha\Downloads\whatsapp-music-bot-master\node_modules\puppeteer\lib\cjs\puppeteer\common\DOMWorld.js:411:34)
at DOMWorld.waitForSelector (C:\Users\cunha\Downloads\whatsapp-music-bot-master\node_modules\puppeteer\lib\cjs\puppeteer\common\DOMWorld.js:319:26)
at Frame.waitForSelector (C:\Users\cunha\Downloads\whatsapp-music-bot-master\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:842:51)
at Page.waitForSelector (C:\Users\cunha\Downloads\whatsapp-music-bot-master\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:1322:33)
at Timeout.getQrCode [as _onTimeout] (C:\Users\cunha\Downloads\whatsapp-music-bot-master\node_modules\whatsapp-web.js\src\Client.js:125:28)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:18788) 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:18788) [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.
(node:18788) UnhandledPromiseRejectionWarning: TimeoutError: waiting for selector canvas failed: timeout 45000ms exceeded
at new WaitTask (C:\Users\cunha\Downloads\whatsapp-music-bot-master\node_modules\puppeteer\lib\cjs\puppeteer\common\DOMWorld.js:411:34)
at DOMWorld.waitForSelector (C:\Users\cunha\Downloads\whatsapp-music-bot-master\node_modules\puppeteer\lib\cjs\puppeteer\common\DOMWorld.js:319:26)
at Frame.waitForSelector (C:\Users\cunha\Downloads\whatsapp-music-bot-master\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:842:51)
at Page.waitForSelector (C:\Users\cunha\Downloads\whatsapp-music-bot-master\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:1322:33)
at Timeout.getQrCode [as _onTimeout] (C:\Users\cunha\Downloads\whatsapp-music-bot-master\node_modules\whatsapp-web.js\src\Client.js:125:28)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:18788) 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)
(node:18788) UnhandledPromiseRejectionWarning: TimeoutError: waiting for selector canvas failed: timeout 45000ms exceeded
at new WaitTask (C:\Users\cunha\Downloads\whatsapp-music-bot-master\node_modules\puppeteer\lib\cjs\puppeteer\common\DOMWorld.js:411:34)
at DOMWorld.waitForSelector (C:\Users\cunha\Downloads\whatsapp-music-bot-master\node_modules\puppeteer\lib\cjs\puppeteer\common\DOMWorld.js:319:26)
at Frame.waitForSelector (C:\Users\cunha\Downloads\whatsapp-music-bot-master\node_modules\puppeteer\lib\cjs\puppeteer\common\FrameManager.js:842:51)
at Page.waitForSelector (C:\Users\cunha\Downloads\whatsapp-music-bot-master\node_modules\puppeteer\lib\cjs\puppeteer\common\Page.js:1322:33)
at Timeout.getQrCode [as _onTimeout] (C:\Users\cunha\Downloads\whatsapp-music-bot-master\node_modules\whatsapp-web.js\src\Client.js:125:28)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:18788) 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: 3)

Já tentei com npm run dev e yarn

Fails to initialize bot

I've tried installing this for many times. I think the problem is from client side.

Screenshot (9)
It always end up with a error message like this. I've also turned of two-step verification in my app for making connection easier..
Someone please solve this problem. Thanks in advance.

Not reading the qr

The qr is not getting recognized. It worked fine when i tried a while back but not now

erro no "videoDetails.thumbnails"

Assim que alguém envia !play death bed o Git dá esse erro!

videoDetails.thumbnail.thumbnails will be removed in a near future release, use videoDetails.thumbnails instead.
Error: spawn /usr/bin/ffmpeg ENOENT
at Process.ChildProcess._handle.onexit (node:internal/child_process:276:19)
at onErrorNT (node:internal/child_process:476:16)
at processTicksAndRejections (node:internal/process/task_queues:80:21)
[ERROR] 23:37:50 Error: spawn /usr/bin/ffmpeg ENOENT

erro videoDetails.thumbnail.thumbnails

da o erro videoDetails.thumbnail.thumbnails will be removed in a near future release, use videoDetails.thumbnails instead.
Error: spawn /usr/bin/ffmpeg ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
at onErrorNT (internal/child_process.js:465:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
[ERROR] 10:23:54 Error: spawn /usr/bin/ffmpeg ENOENT

o ffmpeg esta no path certo e ta tudo certinho, oq eu posso fazer ?

Cannot read properties of undefined (reading 'Sticker')

Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'Sticker')
    at __puppeteer_evaluation_script__:32:70
    at ExecutionContext._evaluateInternal (E:\Github\Personal\WhatsAppMusic\node_modules\puppeteer\src\common\ExecutionContext.ts:273:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at ExecutionContext.evaluate (E:\Github\Personal\WhatsAppMusic\node_modules\puppeteer\src\common\ExecutionContext.ts:140:12)
    at Client.initialize (E:\Github\Personal\WhatsAppMusic\node_modules\whatsapp-web.js\src\Client.js:187:9)
[ERROR] 09:36:52 Error: Evaluation failed: TypeError: Cannot read properties of undefined (reading 'Sticker')
    at __puppeteer_evaluation_script__:32:70

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.