Discord bot that plays Spotify tracks and YouTube videos or any URL including Soundcloud links and Twitch streams.
- Play and search Spotify tracks and YouTube videos or playlists or any URL including Soundcloud links
- Create cross-platform playlists with tracks from any source
- Simple player commands
- Customise your commands using command presets
- Sign in to Spotify to play your own playlists or upload botify playlists
- Manage what roles can access which commands
- Give your bot a name
1.1 Go to https://discordapp.com/developers/applications and create an application
2.1 Go to https://developer.spotify.com/dashboard/applications to create a Spotify application and copy the client id
Don't have a domain? You could either go without logins all together and still use most of botify's features or use your router's public ip and setup port forwarding for your router.
3.1 Go to https://console.developers.google.com/ and create a project for the YouTube Data API and create and copy the credentials
4.1 Navigate to your cloned project and go to ./resources and open the settings.properties file and fill in the blanks, it should look like this:
###################
# server settings #
###################
SERVER_PORT=8000
BASE_URI=http://localhost:8000
REDIRECT_URI=http://localhost:8000/login
##########
# tokens #
##########
DISCORD_TOKEN=#copy your discord token here
SPOTIFY_CLIENT_ID=#copy your spotify client id here
SPOTIFY_CLIENT_SECRET=#copy your spotify client secret here
YOUTUBE_CREDENTIALS=#copy your youtube credentials here
#################
# contributions #
#################
PLAYLISTS_PATH=./resources/playlists.xml
GUILD_PLAYLISTS_PATH=./resources/%splaylists.xml
GUILD_SPECIFICATION_PATH=./resources/guildSpecifications.xml
COMMANDS_PATH=./resources/commands.xml
COMMAND_INTERCEPTORS_PATH=./resources/commandInterceptors.xml
HTTP_HANDLERS_PATH=./resources/httpHandlers.xml
STARTUP_TASKS_PATH=./resources/startupTasks.xml
LOGIN_PAGE_PATH=./resources/login.html
LIST_PAGE_PATH=./resources/playlist_view.html
ERROR_PAGE_PATH=./resources/default_error_page.html
QUEUE_PAGE_PATH=./resources/queue_view.html
###############
# preferences #
###############
MODE_PARTITIONED=true
# playlists per guild (if mode_partitioned = true, else playlist total)
PLAYLIST_COUNT_MAX=50
PLAYLIST_SIZE_MAX=5000
#######################################
# discordbots.org settings (optional) #
#######################################
DISCORD_BOT_ID=#copy your discord client id here
DISCORDBOTS_TOKEN=#copy your discordbots.org token here
Navigate to ./resources/hibernate.cfg.xml and adjust the settings, if you use a local postgres server and name your database botify_playlists you can leave it like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
<property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/botify_playlists</property>
<property name="hibernate.connection.username">postgres</property>
<property name="hibernate.connection.password">postgres</property>
<property name="hibernate.dialect">org.hibernate.dialect.PostgreSQL94Dialect</property>
<property name="show_sql">false</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.timeout">1800</property>
<property name="hibernate.c3p0.max_statements">50</property>
</session-factory>
</hibernate-configuration>
If you need help setting up your postgres server, please refer to their official documentation: http://www.postgresqltutorial.com/