An example of how you can implement ytdl-core into Discord using discord.js. Screenshots
Without changing anything, you have access to the following commands:
play <url, playlist or search>
queue
,np
,volume [new volume]
skip
,stop
,pause
,resume
ping
The default prefix is Y!
You need to have:
- Node - confirmed working on v10.16.3
- npm - comes with Node, doesn't really matter what version iirc
- A Discord Bot token, and having the bot in your server
One-time setup:
- Rename
config.example.json
toconfig.json
, and fill in new values. - Do
npm i
, wait for it to finish
Start the bot with node app.js
.
Some packages in the code use the npm-package windows-build-tools. For this to be properly installed, you will have to open an administrative command prompt- or powershell-window and type npm i -g windows-build-tools
and wait a good while until it finishes. If you are new to Node, just know this package is used in more than this code and you should install it regardless.
Want to contribute? Great, we love that! Please take your time on opening a new issue.
You can see all contributors and their GitHub-profiles here.
We use the MIT-license.
A short, permissive software license. Basically, you can do whatever you want as long as you include the original copyright and license notice in any copy of the software/source. There are many variations of this license in use.
Fetched from TLDRLegal, please also read the license if you plan on using the source code. This is only a short summary. Please also take note of that we are not forced to help you, but you can get help in the support server regardless.