![# botify](https://raw.githubusercontent.com/robinfriedli/aiode/master/resources-public/img/aiode-logo-wide.png)
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 play any URL including Soundcloud links and Twitch streams
* Create cross-platform playlists with tracks from any source
* Simple and customisable player commands
* Create custom command presets as shortcuts for your most used commands
* Adjustable properties for even deeper customisation
* Sign in to Spotify to play your own playlists or upload aiode playlists
* Manage what roles can access which commands
* Customise how you want to summon your bot by using a custom prefix or giving your bot a name
* Advanced admin commands such as updating and rebooting the bot or cleaning up the database available to bot administrators
* Capable scripting sandbox that enables running and storing custom groovy scripts and modifying command behavior through interceptors
## Invite it to your guild
[Invite the bot to join 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 aiode'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 aiode settings
#### 4.1 Apply your confidentials created in the previous steps and manage your private settings
##### 4.1.1 Navigate to your cloned project and go to `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.
##### 4.1.2 Adjust datasource properties and enter the database user and password, database setup will be discussed further in 4.2.1.
##### 4.1.3 To take advantage of the admin commands that can perform administrative actions, such as updating and restarting the bot, be sure to add your Discord user id to the `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".
```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 cookies #
###################
# set these properties to support age restricted videos on YouTube, see https://github.com/Walkyst/lavaplayer-fork/issues/18
aiode.tokens.yt-3PSID=
aiode.tokens.yt-3PAPISID=
```
#### 4.2 Adjust application.properties
##### 4.2.1 Review the datasource properties and make necessary adjustments. If you are using a local postgres server and name your database "aiode" you can leave it as it is. If you need help setting up your postgres server, please refer to their official documentation: http://www.postgresqltutorial.com/.
##### 4.2.2 For Aiode to manage the YouTube API quota usage automatically, be sure to fill in the `aiode.preferences.youtube_api_daily_quota` property; open the Google developer console and go to Library > YouTube Data API v3 > Manage > Quotas
##### 4.2.3 Change the `aiode.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.
```properties
###################
# 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.PostgreSQL10Dialect
###############
# 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.PostgreSQL10Dialect
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
```
### 6 Compile and run aiode
Requires:
* java jdk 11 or above (preferably 11, as it is the version used in development and thus main supported version)
* rust and cargo-make
没有合适的资源?快使用搜索试试~ 我知道了~
播放 Spotify 曲目或任何 URL的 Discord 机器人_java_代码_下载
共436个文件
java:361个
png:16个
xml:15个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 170 浏览量
2022-07-02
00:52:00
上传
评论
收藏 1.17MB ZIP 举报
温馨提示
播放 Spotify 曲目或任何 URL(包括 Soundcloud 链接和 Twitch 流)的 Discord 机器人。 播放和搜索 Spotify 曲目和 YouTube 视频或播放列表或播放任何 URL,包括 Soundcloud 链接和 Twitch 流 使用任何来源的曲目创建跨平台播放列表 简单且可自定义的播放器命令 创建自定义命令预设作为最常用命令的快捷方式 可调整的属性,可进行更深入的定制 登录 Spotify 播放您自己的播放列表或上传 aiode 播放列表 管理哪些角色可以访问哪些命令 通过使用自定义前缀或为您的机器人命名来自定义您希望如何召唤您的机器人 高级管理命令,例如更新和重新启动机器人或清理机器人管理员可用的数据库 功能强大的脚本沙箱,支持运行和存储自定义 groovy 脚本并通过拦截器修改命令行为
资源推荐
资源详情
资源评论
收起资源包目录
播放 Spotify 曲目或任何 URL的 Discord 机器人_java_代码_下载 (436个子文件)
gradlew.bat 3KB
style.css 551B
style.css 286B
.gitignore 150B
.gitignore 49B
build.gradle 4KB
settings.gradle 27B
gradlew 8KB
playlist_view.html 1KB
index.html 1KB
queue_view.html 1KB
default_error_page.html 464B
login.html 432B
gradle-wrapper.jar 58KB
YouTubeService.java 45KB
AbstractCommand.java 26KB
PermissionCommand.java 26KB
MessageService.java 25KB
GroovyCompilationCustomizer.java 22KB
SearchCommand.java 20KB
SpotifyService.java 19KB
PlayableFactory.java 19KB
AbstractPlayableLoadingCommand.java 18KB
GroovyWhitelistManager.java 18KB
AudioQueue.java 16KB
GuildManager.java 16KB
CommandManager.java 15KB
DiscordEntity.java 13KB
SecurityManager.java 13KB
Aiode.java 13KB
QueueIterator.java 13KB
PermissionTarget.java 12KB
ArgumentController.java 12KB
CleanDbCommand.java 11KB
Table.java 11KB
SafeGroovyScriptRunner.java 11KB
ChartsCommand.java 11KB
AudioTrafficSimulationCommand.java 11KB
ExecutionContext.java 11KB
ChainableInterceptor.java 10KB
Playlist.java 9KB
AbstractWidget.java 9KB
AlertAccessConfigurationModificationInterceptor.java 9KB
CommandExecutionInterceptor.java 9KB
TypeCheckingExtension.java 9KB
AudioManager.java 9KB
ThreadExecutionQueue.java 9KB
RefreshSpotifyRedirectIndicesTask.java 9KB
ConnectCommand.java 9KB
StoredScript.java 8KB
QueueCommand.java 8KB
Playable.java 8KB
InterceptorChain.java 8KB
GuildPropertyInterceptor.java 8KB
AbstractScriptCommand.java 8KB
MoveCommand.java 8KB
WidgetManager.java 8KB
CommandParser.java 8KB
SpotifyUri.java 8KB
AudioPlayback.java 8KB
SessionManagementEndpoint.java 8KB
ScriptCommandInterceptor.java 7KB
ThreadContext.java 7KB
CommandListener.java 7KB
GuildManagementListener.java 7KB
QueryBuilder.java 7KB
RequestInterceptorHandler.java 7KB
ExceptionUtils.java 7KB
EmbedTable.java 7KB
HibernatePlaylistMigrator.java 7KB
PlaybackHistory.java 7KB
ScriptCommand.java 6KB
HollowYouTubeVideo.java 6KB
EagerlyScalingThreadPoolExecutor.java 6KB
HelpCommand.java 6KB
SpotifyTrackResultHandler.java 6KB
SearchEngine.java 6KB
CollectingInterceptor.java 6KB
VersionUpdateAlertTask.java 6KB
SpotifyRedirectService.java 6KB
RateLimitInvoker.java 6KB
GuildSpecification.java 6KB
QueryBuilderFactory.java 6KB
AbstractPaginationWidget.java 6KB
SpotifyTrack.java 5KB
AbstractWidgetAction.java 5KB
AddCommand.java 5KB
CommandContext.java 5KB
SubQueryBuilderFactory.java 5KB
AbstractGuildProperty.java 5KB
CorrelatedSubQueryBuilder.java 5KB
AnalyticsCommand.java 5KB
SnowflakeMap.java 5KB
MigrateGuildSpecificationsTask.java 5KB
QueueViewHandler.java 5KB
PropertyCommand.java 5KB
InjectorService.java 5KB
AccessConfiguration.java 5KB
GuildContext.java 5KB
ArgumentBuildingMode.java 5KB
共 436 条
- 1
- 2
- 3
- 4
- 5
资源评论
快撑死的鱼
- 粉丝: 1w+
- 资源: 9156
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功