https://github.com/alexlisenkov/discord-bot
A fully javascript based discord music bot that runs on node
https://github.com/alexlisenkov/discord-bot
bot discord javascript music nodejs
Last synced: 3 months ago
JSON representation
A fully javascript based discord music bot that runs on node
- Host: GitHub
- URL: https://github.com/alexlisenkov/discord-bot
- Owner: AlexLisenkov
- License: gpl-3.0
- Created: 2017-12-06T20:32:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-26T05:57:33.000Z (8 months ago)
- Last Synced: 2024-10-30T01:43:08.484Z (8 months ago)
- Topics: bot, discord, javascript, music, nodejs
- Language: TypeScript
- Size: 741 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 66
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Discord Music Bot
[](https://discordbots.org/bot/387686098534531076)[](https://discordbots.org/bot/387686098534531076)[](https://discordbots.org/bot/387686098534531076)
**An open-source TypeScript music bot for discord that runs on Node.**Next to listening to music you also can:
* Manage the **channels the bot can't join**
* Fully manageable **roles and permissions**
* Ability to **blacklist songs**
* Choose your own **custom prefix**## Features
__Commands__ (prefixed with your defined prefix)
* `help` List commands
* `join` Joins a channel
* `play ` Add song to queue
* `forceplay ` Plays a song directly, skipping the current song
* `pause` Pause current song
* `resume` Resume current song
* `queue ` List queue, page command is optional
* `skip` Skip current song
* `np` Show the song that is currenty playing
* `shuffle` Suffles the queue
* `remove ` Remove a song from the playlist (index, range or mention a user)
* `move ` Move a songs from one index to another
* `volume <0-100>` Set the volume
* `mute` Mute the bot
* `unmute` Unmute the bot
* `clearqueue` Clears queue and stops playing
* `disconnect` Disconnect bot from channel and clear queue
* `statistics` See global, server and personal statistics
* `blacklist show` Lists blacklisted YouTube ids
* `voicechannel show` Lists blocked voice channels for the botAdmin commands:
* `blacklist add ` Adds a YouTube video to the blacklist
* `blacklist remove ` Removes a YouTube video from the blacklist
* `voicechannel disallow ` Blocks the bot from joining a channel
* `voicechannel allow ` Removes the channel from the blacklist
* `dj role ` Set the DJ role
* `dj require ` Set a command to DJ-only *(help command is always public)*
* `dj remove ` Remove DJ-only from a command
* `prefix ` Set the prefix for commandsNote:
* Administrators can always run every command
* Admin commands can only be ran by administrators. When you give admin-only commands DJ-only, DJ's are also able to run this command.## Pre requirements
* [A discord bot](https://discordapp.com/developers/applications/me)
* [A YouTube v3 api key](https://developers.google.com/youtube/v3/getting-started)
* [Node.js](https://nodejs.org) (8.9.4 or higher, latest version recommended)
* [ffmpeg](https://www.ffmpeg.org/) (latest)
* [Firebase](https://console.firebase.google.com/u/0/) (just the database)## Installation
1. Install all pre requirements
2. Clone this repository
3. Copy config.json.example > config.json
4. Copy youtube.config.json.example > youtube.config.json
5. Run `npm install` to install all dependencies
6. Make sure all your credentials are correct__config.json example__
```javascript
{
"secret": "Your secret", // This password is used for the http
"http_port": 8000, (8000 by default)
"message_lifetime": 30000,
"token": "Discord api token",
"prefix": ".",
"queue_limit": 50, // -1 for unlimited
"firebase": {
"apiKey": "",
"authDomain": "",
"databaseURL": "",
"projectId": "",
"storageBucket": ""
}
}
```__config.youtube.json example__
```javascript
{
"API_KEY": "Paste your key here",
"default_stream_options": {
"seek": 0,
"volume": 1
}
}
```## Run the bot
1. Run `npm start` in the installation directory### Todo:
[See our trello](https://trello.com/b/kWbyNTxN/kanban)