Skip to content

Commit

Permalink
Fixed Bot not Playing
Browse files Browse the repository at this point in the history
  • Loading branch information
RECHERGG committed Apr 1, 2023
1 parent 29b27b9 commit 3aaa85d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
12 changes: 6 additions & 6 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ repositories {

dependencies {
implementation("org.slf4j:slf4j-api:2.0.5")
implementation("ch.qos.logback:logback-classic:1.4.5")
implementation("net.dv8tion:JDA:5.0.0-beta.2")
implementation("ch.qos.logback:logback-classic:1.4.6")
implementation("net.dv8tion:JDA:5.0.0-beta.6")


//LavaPlayer
implementation("com.sedmelluq:lavaplayer:1.3.78")
implementation("com.fasterxml.jackson.core:jackson-databind:2.12.7.1")
implementation("commons-codec:commons-codec:1.13")
implementation("commons-io:commons-io:2.7")
implementation("org.apache.httpcomponents:httpclient:4.5.13")
implementation("com.fasterxml.jackson.core:jackson-databind:2.14.2")
implementation("commons-codec:commons-codec:1.15")
implementation("commons-io:commons-io:2.11.0")
implementation("org.apache.httpcomponents:httpclient:4.5.14")
}

tasks {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/de/rechergg/BluePearlMusic.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ private void login(String token) {
);

getJda().getPresence().setStatus(OnlineStatus.ONLINE);
getJda().getGuilds().forEach(guild -> guild.getAudioManager().setSelfDeafened(true));
getJda().getGuilds().forEach(guild -> guild.getAudioManager().setSelfMuted(false));
getJda().getPresence().setActivity(Activity.playing(" Music"));
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/de/rechergg/core/TrackManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import com.sedmelluq.discord.lavaplayer.player.event.AudioEventAdapter;
import com.sedmelluq.discord.lavaplayer.track.AudioTrack;
import com.sedmelluq.discord.lavaplayer.track.AudioTrackEndReason;
import de.rechergg.BluePearlMusic;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.entities.channel.concrete.VoiceChannel;
Expand Down Expand Up @@ -101,7 +102,6 @@ public void onTrackStart(AudioPlayer player, AudioTrack track) {
VoiceChannel voiceChannel = (VoiceChannel) info.author().getVoiceState().getChannel();

info.author().getGuild().getAudioManager().openAudioConnection(voiceChannel);

}

@Override
Expand Down

0 comments on commit 3aaa85d

Please sign in to comment.