All Projects → Emzi0767 → Discord-Music-Turret-Bot

Emzi0767 / Discord-Music-Turret-Bot

Licence: AGPL-3.0 license
A standalone Discord music bot, made with DSharpPlus, using Lavalink.

Programming Languages

C#
18002 projects
shell
77523 projects

Projects that are alternatives of or similar to Discord-Music-Turret-Bot

Alexi5
A Discord Bot built using discordJS. Started as a joke for spamming memes. Branch "v2" is currently being used for active development. Hosted on Heroku.
Stars: ✭ 19 (+35.71%)
Mutual labels:  discord-music-bot, youtube-api, music-bot
lavamusic
lavalink music bot base in erela.js and discord.js v13
Stars: ✭ 210 (+1400%)
Mutual labels:  discord-music-bot, music-bot, lavalink
Commando
[DEPRECATED] ⚫ Commando Discord bot built on discord.js-commando.
Stars: ✭ 78 (+457.14%)
Mutual labels:  discord-music-bot, discord-api, music-bot
noteblock
A open-source music bot based on lavalink.
Stars: ✭ 93 (+564.29%)
Mutual labels:  discord-music-bot, music-bot, lavalink
NanoSpace
Erela.js & Discord.js@v14 (Prefix Commands!)
Stars: ✭ 59 (+321.43%)
Mutual labels:  discord-music-bot, lavalink
Discord Music Bot
Discord Music Bot. Play, Playlist, Welcome and Administrative commands.
Stars: ✭ 18 (+28.57%)
Mutual labels:  discord-music-bot, lavalink
LenoxBot
🖥️ LenoxBot is a Discord bot that offers many cool new features to your Discord server!
Stars: ✭ 218 (+1457.14%)
Mutual labels:  discord-music-bot, discord-api
Music-Slash-Bot
A music bot written in Discord.js and Distube using the slash command
Stars: ✭ 34 (+142.86%)
Mutual labels:  discord-music-bot, music-bot
opensource-discordbots
Curated list of awesome open-source Discord Bots
Stars: ✭ 19 (+35.71%)
Mutual labels:  discord-music-bot, discord-api
FlareBot
A nice Discord bot made with JDA, FlareBot is a music and server administration bot along with a few other cool features
Stars: ✭ 39 (+178.57%)
Mutual labels:  discord-music-bot, discord-api
Music-Discord-Bot
A music Discord bot with more than 30+ commands which allows to play music on your server efficiently. Supports Youtube, Spotify, Deezer and Soundcloud links. Skips intros and blanks in the music with Sponsorblock.
Stars: ✭ 57 (+307.14%)
Mutual labels:  discord-music-bot, lavalink
discord-lavalink-music-bot
This is music bot for discord made with erelajs, lavalink, discordjs v13-dev
Stars: ✭ 34 (+142.86%)
Mutual labels:  discord-music-bot, lavalink
Lavalink4NET
Lavalink4NET is a Lavalink wrapper with node clustering, caching and custom players for .NET with support for Discord.Net and DSharpPlus.
Stars: ✭ 95 (+578.57%)
Mutual labels:  discord-music-bot, lavalink
Laffey
An adorable lavalink discord music bot that has a lot of features inside it.
Stars: ✭ 82 (+485.71%)
Mutual labels:  discord-music-bot, lavalink
DingoLingo
A Discord music bot written in Python with support for Youtube, SoundCloud, Spotify, Bandcamp, Twitter, and custom files.
Stars: ✭ 183 (+1207.14%)
Mutual labels:  discord-music-bot, music-bot
muser
Muser: A powerful Discord music bot made in DJs v13 managed by PGamerX, Peiprjs, and Luckie.
Stars: ✭ 66 (+371.43%)
Mutual labels:  discord-music-bot, music-bot
SeoaBot
The Discord bot was name Seoa
Stars: ✭ 28 (+100%)
Mutual labels:  discord-music-bot, music-bot
Discord.JS-Music-Bot
A simple Discord.JS music bot using the DisTube npm Package!
Stars: ✭ 23 (+64.29%)
Mutual labels:  discord-music-bot, music-bot
A41SLBOT
All For One Bot is an open-source discord server bot built for All For One SL™ discord server.
Stars: ✭ 83 (+492.86%)
Mutual labels:  discord-music-bot, discord-api
Shoukaku
A featureful stable wrapper for Lavalink
Stars: ✭ 140 (+900%)
Mutual labels:  discord-music-bot, lavalink

Music Turret Emzi's Central Dispatch

Music Turret is a music bot built because Companion Cube's music module felt like afterthought clutter.

It's a custom solution designed for a couple of servers, and, as such, my instance is not available for public use. Feel free to self-host, however.

Requirements

In order to run the bot you will need to have the following components installed and available on your system:

  • .NET 5 runtime
  • Java 8 or better
  • PostgreSQL server 10 or better
  • Redis server
  • Lavalink

The bot was designed for UNIX-like environments, and is not guaranteed to work under Windows.

Building

The bot requires that you have .NET 5 SDK, and preferably Visual Studio 2019 installed and available on your system.

The required NuGet configurations are available in solution's root directory, so no further NuGet configuration should be required. Should that happen to not be the case, however, add the following MyGet feed to your NuGet sources: https://nuget.emzi0767.com/api/v3/index.json

Visual Studio 2019

Just open the solution and hit build, then publish. This will create a complete bot distribution in bin/Release/net5.0/publish/.

.NET Core SDK command line

Navigate to where the solution is located. From there you need to restore packages, build, and publish:

  • dotnet restore
  • dotnet build -c Release
  • dotnet publish -c Release -f net5.0 -r linux-x64

Setting up

If you have all the required components installed, you need to properly set your environment up before running the bot.

I strongly recommend using Docker or another isolation/containerization solution to contain your bot.

Step 1: PostgreSQL

You will need to log in to your PostgreSQL server, and create both a user and a database for the bot's data. This is typically done via psql utility.

After connecting to your database, you will first need to create a user for the bot to authenticate as: create user discord_turret with nocreatedb nocreaterole encrypted password 'hunter2'; Do not forget to substitute the username and password with your own values.

Next step is to create a database for the database for the bot's data: create database discord_turret with owner='discord_turret'; Of course, don't forget to set your own database name, and set the owner to the username you created.

Finally, you need to input the schema into the database. Exit the psql utility and copy the schema files from Database directory to your server. Next up, open up a shell on your server, navigate to where you dropped the SQL files, and execute the following: find . -iname '*.sql' -exec cat "{}" \; | PGPASSWORD="hunter2" psql -U discord_turret -d discord_turret -h localhost This command will load all schema files to your database. Don't forget to set your password, username, database name, and hostname correctly.

Step 2: Lavalink

Download and extract Lavalink. Copy the lavalink.sh script from this repo's Scripts directory to Lavalink's, then make it executable via chmod +x lavalink.sh.

Then follow the Lavalink's installation instructions, filling the config with proper values.

Step 3: YouTube API

Open your browser and go to Google Developer Console. There, create a new project.

Once the project is created, go to its dashboard, and from there to API library. Find YouTube Data API v3, and enable it.

When you enable the API, go to Credentials tab, and press Create Credentials. Select API key as type. Copy the created API key and save it for later.

You can optionally give it a name and restrict its usage.

Step 4: Discord API

Go to Discord Developers page and create a new app for the bot. Give it a name and an icon, and press Save Changes. When changes are saved, go to Bot tab, and press Add Bot. Give the bot a username and avatar, and uncheck the Public Bot checkbox, then press Save Changes.

Once changes are saved, press the Copy button under the token. Save the token for later.

Step 5: Configuration

Copy all the files from your bot's publish directory to your target directory. Nextup, copy the bot.sh script from the repo's Scripts directory to the same place as your bot, and make it executable via chmod +x bot.sh.

Copy config.json.example from this repository to where the bot files are, and open it in your text editor.

Go to discord section, and paste the Discord API token from step 4 into the token field. You can optionally configure other options here.

Once that's done, go to postgres section. Enter your PostgreSQL server data and database credentials. If your PostgreSQL server runs with SSL/TLS disabled, set encrypt to false.

Next up, go to redis section and fill it with proper data for connecting to your Redis server.

Next, go to lavalink section, and enter your Lavalink connection details and the password you set when setting up Lavalink.

Finally, go to youtube section, and paste the API key you obtained in step 3.

When all is done, press save.

Step 6: Run Lavalink

Using your favourite container software or container multiplexer, start Lavalink by running the autorestart script: ./lavalink.sh. Detach from the multiplexer.

Step 7: Run the bot

Like above, using a multiplexer or a container, run the bot by doing ./bot.sh. If everything works correctly, congratulations. If not, follow the instructions more carefully.

Support me

Lots of effort went into making this bot, and sometimes even related software.

If you feel like I'm doing a good job, or just want to throw money at me, you can do so through any of the following:

Other questions

If you have other questions or would like to talk in general, feel free to visit my Discord server.

Emzi's Central Dispatch

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].