Skip to content

Commit

Permalink
Updated dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
a9lim committed Apr 25, 2024
1 parent acbf197 commit a75ae35
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 22 deletions.
66 changes: 66 additions & 0 deletions dependency-reduced-pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>a9lim</groupId>
<artifactId>raiko</artifactId>
<version>Snapshot</version>
<build>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>All</shadedClassifierName>
<artifactSet>
<includes>
<include>*:*</include>
</includes>
</artifactSet>
<transformers>
<transformer>
<resource>reference.conf</resource>
</transformer>
<transformer>
<manifestEntries>
<Main-Class>a9lim.raiko.Raiko</Main-Class>
<Specification-Title>${project.artifactId}</Specification-Title>
<Specification-Version>${project.version}</Specification-Version>
<Implementation-Title>${project.artifactId}</Implementation-Title>
<Implementation-Version>${project.version}</Implementation-Version>
<Implementation-Vendor-Id>${project.groupId}</Implementation-Vendor-Id>
</manifestEntries>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>dv8tion</id>
<name>m2-dv8tion</name>
<url>https://m2.dv8tion.net/releases</url>
</repository>
<repository>
<snapshots>
<updatePolicy>always</updatePolicy>
</snapshots>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<properties>
<maven.compiler.target>21</maven.compiler.target>
<maven.compiler.source>21</maven.compiler.source>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
12 changes: 11 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,23 @@
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>5.0.0-beta.21</version>
<version>5.0.0-beta.23</version>
</dependency>
<dependency>
<groupId>dev.arbjerg</groupId>
<artifactId>lavaplayer</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>com.github.lavalink-devs.youtube-source</groupId>
<artifactId>common</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>com.github.lavalink-devs.youtube-source</groupId>
<artifactId>lldevs</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
Expand Down
11 changes: 0 additions & 11 deletions src/main/java/a9lim/raiko/BotConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,6 @@ public void load() {
model = config.getBoolean("cheapmodel");
preprompt = config.getString("preprompt");

ytemail = noneblank(config.getString("ytemail"));
ytpw = noneblank(config.getString("ytpw"));

// we may need to write a new config file
boolean write = false;

Expand Down Expand Up @@ -290,12 +287,4 @@ public String getPreprompt() {
return preprompt;
}

public String getYTEmail() {
return ytemail;
}

public String getYTPW() {
return ytpw;
}

}
6 changes: 3 additions & 3 deletions src/main/java/a9lim/raiko/audio/PlayerManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager;
import com.sedmelluq.discord.lavaplayer.source.vimeo.VimeoAudioSourceManager;
import com.sedmelluq.discord.lavaplayer.source.yamusic.YandexMusicAudioSourceManager;
import com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager;
import dev.lavalink.youtube.YoutubeAudioSourceManager;
import net.dv8tion.jda.api.entities.Guild;
public class PlayerManager extends DefaultAudioPlayerManager {
private final Bot bot;
Expand All @@ -45,10 +45,10 @@ public PlayerManager(Bot b) {

public void init(BotConfig config) {
// custom sources
YoutubeAudioSourceManager yt = new YoutubeAudioSourceManager(true,config.getYTEmail(),config.getYTPW());
YoutubeAudioSourceManager yt = new YoutubeAudioSourceManager(true);
yt.setPlaylistPageCount(10);
registerSourceManager(yt);
registerSourceManager(new NicoAudioSourceManager(null,null));
registerSourceManager(new NicoAudioSourceManager());
registerSourceManager(new YandexMusicAudioSourceManager(true));
registerSourceManager(SoundCloudAudioSourceManager.createDefault());
registerSourceManager(new BandcampAudioSourceManager());
Expand Down
7 changes: 0 additions & 7 deletions src/main/resources/reference.conf
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ cheapmodel = false
preprompt = "You are Raiko Horikawa, fun-loving, free spirited drum tsukumogami. You're having a chat with several humans!"


// This is the optional email and password used by the bot to sign in to youtube
// If set to NONE, you won't be able to access age-restricted videos

ytemail = "NONE"
ytpw = "NONE"


// This is the bot's prefix used to signify commands
// If you use !!, !!play will make it play
// If left empty, the prefix will be a mention of the bot (@Botname play)
Expand Down

0 comments on commit a75ae35

Please sign in to comment.