Discord bot that plays Spotify tracks and YouTube videos or any URL including Soundcloud links and Twitch streams.
Help keep aiode free and open source for everyone
Invite the bot to join your guild
Don't have a domain? You could either go without logins all together and still use most of aiode's features or use your router's public ip and setup port forwarding for your router.
src/main/resources
and create the settings-private.properties
from the example below and fill in the blanks. This file is included in gitignore to make sure you don't accidentally publish it.aiode.security.admin_users
property. To find your Discord user id, enable Developer Mode in the App Settings > Appearance. Then go to any guild, right click your user and click "Copy ID".aiode.tokens.yt-oauth-refresh-token
to "init" and follow the oauth flow, then replace the value with your token.aiode.tokens.yt-po-token
and aiode.tokens.yt-po-visitor-data
properties.##########
# tokens #
##########
aiode.tokens.discord_token=
aiode.tokens.spotify_client_id=
aiode.tokens.spotify_client_secret=
aiode.tokens.youtube_credentials=
############
# security #
############
#define user ids (comma separated) that may access admin commands. These users can always use each command irregardless of access configurations
aiode.security.admin_users=
##############
# datasource #
##############
spring.datasource.username=postgres
spring.datasource.password=postgres
########
# IPv6 #
########
# list IPv6 blocks to use for the lavaplayer route planner (comma separated)
aiode.preferences.ipv6_blocks=
##############################
# top.gg settings (optional) #
##############################
#copy your discord client id here
aiode.tokens.discord_bot_id=
#copy your top.gg token here
aiode.tokens.topgg_token=
#######################
# youtube credentials #
#######################
# set these properties to support age restricted videos on YouTube, see https://github.com/Walkyst/lavaplayer-fork/issues/18
aiode.tokens.yt-email=
aiode.tokens.yt-password=
aiode.tokens.yt-oauth-refresh-token=
aiode.tokens.yt-po-token=
aiode.tokens.yt-po-visitor-data=
##############
# filebroker #
##############
aiode.filebroker.bot_user_name=
aiode.filebroker.bot_user_password=
aiode.preferences.youtube_api_daily_quota
property; open the Google developer console and go to Library > YouTube Data API v3 > Manage > Quotasaiode.server.base_uri
property to your domain or public IP (without slash at the end) and adjust aiode.server.spotify_login_callback
to the corresponding endpoint for Spotify logins (normally BASE_URI + "/login")Don't have a domain? You could either go without a web server all together and still use most of aiode's features or use your
router's public ip and setup port forwarding for your router to the machine where you're running aiode via the port specified by the SERVER_PORT
property.
###################
# server settings #
###################
aiode.server.port=8000
aiode.server.base_uri=http://localhost:8000
aiode.server.spotify_login_callback=http://localhost:8000/login
spring.liquibase.change-log=classpath:liquibase/dbchangelog.xml
spring.liquibase.contexts=definition,initialvalue,constraint
liquibase.change-log-path=src/main/resources/liquibase/dbchangelog.xml
liquibase.referenceUrl=hibernate:spring:net.robinfriedli.aiode.entities?dialect=org.hibernate.dialect.PostgreSQLDialect
###############
# preferences #
###############
# replace this value with your YouTube API Quota: open the Google developer console and go to Library > YouTube Data API v3 > Manage > Quotas
aiode.preferences.youtube_api_daily_quota=1000001
# partitioned = true means that data, such as playlists, presets and scripts will be separated between guilds
# if you host this bot privately and want to share data between few guilds you can set this property to 'false'
# however you should decide decide which mode to use before using the bot; if you have been using the bot with partitioned = true
# and several guilds have playlists or presets or scripts with the same name and you switch to partitioned = false then
# many queries will break because names are no longer unique
aiode.preferences.mode_partitioned=true
aiode.preferences.queue_size_max=10000
# maximum entity count per guild (if mode_partitioned = true, else entity count total)
aiode.preferences.playlist_count_max=50
aiode.preferences.playlist_size_max=5000
aiode.preferences.preset_count_max=100
aiode.preferences.script_count_max=100
aiode.preferences.interceptor_count_max=10
# defines max heap size for the bootRun task
aiode.preferences.max_heap_size=2048m
# disable / enable commands in the scripting category and custom scripted command interceptors
aiode.preferences.enable_scripting=true
##############
# datasource #
##############
spring.datasource.url=jdbc:postgresql://localhost:5432/aiode
spring.datasource.driverClassName=org.postgresql.Driver
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.properties.hibernate.current_session_context_class=thread
# pool
spring.datasource.hikari.minimumIdle=5
spring.datasource.hikari.maximumPoolSize=50
# cache
spring.jpa.properties.hibernate.cache.use_query_cache=true
spring.jpa.properties.hibernate.cache.use_second_level_cache=true
spring.jpa.properties.hibernate.cache.region.factory_class=org.hibernate.cache.jcache.JCacheRegionFactory
spring.jpa.properties.hibernate.javax.cache.provider=org.ehcache.jsr107.EhcacheCachingProvider
spring.jpa.properties.hibernate.javax.cache.missing_cache_strategy=create
##############
# filebroker #
##############
aiode.filebroker.api_base_url=https://filebroker.io/api/
Requires:
wasm32-unknown-unknown
target for the webappInstall rust, preferably via rustup, then add the wasm32-unknown-unknown
target by running rustup target add wasm32-unknown-unknown
and install cargo-make with cargo install --force cargo-make
. Finally, navigate to src/main/webapp
and compile the webapp with cargo make build
.
Navigate to the project root directory and install aiode by running ./gradlew build
(or if you have gradle installed you can just run gradle build
).
Then you can launch aiode using the jar file or the bootRun gradle task. You can either run the
jar file in build/libs
by running java -jar build/libs/aiode-1.0-SNAPSHOT.jar
or run the bash script bash/launch.sh
or use the gradle bootRun task by running ./gradlew bootRun
. To keep the program running when closing the terminal window use a
terminal multiplexer tool like tmux (Unix-like operating systems (e.g. Linux or MacOS) only) to manage a terminal session.