Skip to content

Commit

Permalink
Updated dependencies, added roll command
Browse files Browse the repository at this point in the history
  • Loading branch information
a9lim committed Jan 11, 2024
1 parent 01146bb commit 4c1cbf0
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 487 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
<dependency>
<groupId>net.dv8tion</groupId>
<artifactId>JDA</artifactId>
<version>5.0.0-beta.18</version>
<version>5.0.0-beta.19</version>
</dependency>
<dependency>
<groupId>dev.arbjerg</groupId>
<artifactId>lavaplayer</artifactId>
<version>2.0.4</version>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>org.json</groupId>
Expand Down
8 changes: 2 additions & 6 deletions src/main/java/a9lim/raiko/Raiko.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@
import a9lim.raiko.commands.admin.SettcCmd;
import a9lim.raiko.commands.admin.SetvcCmd;
import a9lim.raiko.commands.chat.*;
import a9lim.raiko.commands.general.AboutCmd;
import a9lim.raiko.commands.general.EchoCmd;
import a9lim.raiko.commands.general.PingCmd;
import a9lim.raiko.commands.general.SettingsCmd;
import a9lim.raiko.commands.general.*;
import a9lim.raiko.commands.music.*;
import a9lim.raiko.commands.owner.*;
import a9lim.raiko.entities.Prompt;
Expand Down Expand Up @@ -99,6 +96,7 @@ private static void startBot() {
new PingCmd(),
new SettingsCmd(),
new EchoCmd(),
new RollCmd(),

new NowplayingCmd(),
new PlayCmd(),
Expand Down Expand Up @@ -163,8 +161,6 @@ private static void startBot() {
bot.setJDA( JDABuilder.create(config.getToken(), Arrays.asList(INTENTS))
.enableCache(CacheFlag.MEMBER_OVERRIDES, CacheFlag.VOICE_STATE)
.disableCache(CacheFlag.ACTIVITY, CacheFlag.CLIENT_STATUS, CacheFlag.EMOJI, CacheFlag.ONLINE_STATUS, CacheFlag.SCHEDULED_EVENTS)
// .setActivity(config.getGame())
// .setStatus(config.getStatus())
.addEventListeners(cb.build(), waiter, new Listener(bot))
.setBulkDeleteSplittingEnabled(true).build() );
} catch (IllegalArgumentException ex) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/a9lim/raiko/audio/PlayerManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import a9lim.raiko.Bot;
import a9lim.raiko.BotConfig;
import a9lim.raiko.audio.sourcefix.BiliAudioSourceManager;
import a9lim.raiko.audio.sourcefix.FixNicoAudioSourceManager;
import com.sedmelluq.discord.lavaplayer.container.MediaContainerRegistry;
import com.sedmelluq.discord.lavaplayer.player.AudioPlayer;
import com.sedmelluq.discord.lavaplayer.player.DefaultAudioPlayerManager;
Expand All @@ -30,6 +29,7 @@
import com.sedmelluq.discord.lavaplayer.source.getyarn.GetyarnAudioSourceManager;
import com.sedmelluq.discord.lavaplayer.source.http.HttpAudioSourceManager;
import com.sedmelluq.discord.lavaplayer.source.local.LocalAudioSourceManager;
import com.sedmelluq.discord.lavaplayer.source.nico.NicoAudioSourceManager;
import com.sedmelluq.discord.lavaplayer.source.soundcloud.SoundCloudAudioSourceManager;
import com.sedmelluq.discord.lavaplayer.source.twitch.TwitchStreamAudioSourceManager;
import com.sedmelluq.discord.lavaplayer.source.vimeo.VimeoAudioSourceManager;
Expand All @@ -48,7 +48,7 @@ public void init(BotConfig config) {
YoutubeAudioSourceManager yt = new YoutubeAudioSourceManager(true,config.getYTEmail(),config.getYTPW());
yt.setPlaylistPageCount(10);
registerSourceManager(yt);
registerSourceManager(new FixNicoAudioSourceManager(config.getNNDEmail(),config.getNNDPW()));
registerSourceManager(new NicoAudioSourceManager(null,null));
registerSourceManager(new YandexMusicAudioSourceManager(true));
registerSourceManager(SoundCloudAudioSourceManager.createDefault());
registerSourceManager(new BandcampAudioSourceManager());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,10 @@
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.HttpClientBuilder;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.regex.Matcher;
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/a9lim/raiko/audio/sourcefix/BiliAudioTrack.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

import com.sedmelluq.discord.lavaplayer.container.mpeg.MpegAudioTrack;
import com.sedmelluq.discord.lavaplayer.source.AudioSourceManager;
import com.sedmelluq.discord.lavaplayer.tools.DataFormatTools;
import com.sedmelluq.discord.lavaplayer.tools.FriendlyException;
import com.sedmelluq.discord.lavaplayer.tools.JsonBrowser;
import com.sedmelluq.discord.lavaplayer.tools.io.HttpClientTools;
import com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface;
Expand All @@ -32,16 +30,11 @@
import com.sedmelluq.discord.lavaplayer.track.playback.LocalAudioTrackExecutor;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.net.URI;
import java.nio.charset.StandardCharsets;

import static com.sedmelluq.discord.lavaplayer.tools.FriendlyException.Severity.SUSPICIOUS;

public class BiliAudioTrack extends DelegatedAudioTrack {
private static final Logger log = LoggerFactory.getLogger(BiliAudioTrack.class);
Expand Down

This file was deleted.

Loading

0 comments on commit 4c1cbf0

Please sign in to comment.