Git Product home page Git Product logo

botify's Introduction

# botify 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

Invite it to your guild

https://discordapp.com/api/oauth2/authorize?client_id=483377420494176258&permissions=70315072&scope=bot

Host it yourself

1. Create a Discord app

1.1 Go to https://discordapp.com/developers/applications and create an application

1.2 Click "Bot" on the side menu to create a bot and copy the token for later

2. Create a Spotify app

2.1 Go to https://developer.spotify.com/dashboard/applications to create a Spotify application and copy the client id

2.2 Click on "Edit Settings" and whitelist your Redirect URI for the Spotify login

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. Create a YouTube Data API project

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. Setup botify settings

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

5. Setup database

5.1 Setup hibernate configuration

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/

botify's People

Contributors

robinfriedli avatar

Stargazers

Tominous avatar

Watchers

Tominous avatar

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.