diff --git a/pom.xml b/pom.xml
index 470de55..569e8aa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
net.dv8tion
JDA
- 4.1.0_99
+ 4.1.0_97
org.json
diff --git a/src/main/java/com/bbn/hadder/Hadder.java b/src/main/java/com/bbn/hadder/Hadder.java
index 2dd1812..b4a6cbb 100644
--- a/src/main/java/com/bbn/hadder/Hadder.java
+++ b/src/main/java/com/bbn/hadder/Hadder.java
@@ -103,8 +103,7 @@ public class Hadder {
new StopCommand(),
new BlacklistCommand(),
new PauseCommand(),
- new LoopCommand(),
- new BassCommand()), config, helpCommand);
+ new LoopCommand()), config, helpCommand);
builder.addEventListeners(
new MentionListener(rethink),
@@ -119,7 +118,7 @@ public class Hadder {
try {
shardManager = builder.build();
- } catch (Exception e) {
+ } catch (LoginException e) {
e.printStackTrace();
}
}
diff --git a/src/main/java/com/bbn/hadder/audio/AudioManager.java b/src/main/java/com/bbn/hadder/audio/AudioManager.java
index 4e7b730..6dd6f18 100644
--- a/src/main/java/com/bbn/hadder/audio/AudioManager.java
+++ b/src/main/java/com/bbn/hadder/audio/AudioManager.java
@@ -30,7 +30,6 @@ public class AudioManager {
public AudioManager() {
AudioSourceManagers.registerRemoteSources(myManager);
- myManager.getConfiguration().setFilterHotSwapEnabled(true);
}
public boolean hasPlayer(Guild guild) {
diff --git a/src/main/java/com/bbn/hadder/audio/TrackManager.java b/src/main/java/com/bbn/hadder/audio/TrackManager.java
index 5154b80..91fa146 100644
--- a/src/main/java/com/bbn/hadder/audio/TrackManager.java
+++ b/src/main/java/com/bbn/hadder/audio/TrackManager.java
@@ -48,10 +48,10 @@ public class TrackManager extends AudioEventAdapter {
@Override
public void onTrackEnd(AudioPlayer player, AudioTrack track, AudioTrackEndReason endReason) {
+ Guild g = queue.element().getAuthor().getGuild();
if (loop) {
player.playTrack(track.makeClone());
} else if (queue.isEmpty()) {
- Guild g = queue.poll().getAuthor().getGuild();
g.getAudioManager().closeAudioConnection();
} else {
player.playTrack(queue.element().getTrack().makeClone());
diff --git a/src/main/java/com/bbn/hadder/commands/misc/GitHubCommand.java b/src/main/java/com/bbn/hadder/commands/misc/GitHubCommand.java
index 8c1ffd6..906798e 100644
--- a/src/main/java/com/bbn/hadder/commands/misc/GitHubCommand.java
+++ b/src/main/java/com/bbn/hadder/commands/misc/GitHubCommand.java
@@ -79,9 +79,6 @@ public class GitHubCommand implements Command {
}
}
} else {
- event.getHelpCommand().sendHelp(this, event);
- /*
- TODO: THIS
event.getTextChannel().sendMessage(
event.getMessageEditor().getMessage(
MessageEditor.MessageType.INFO,
@@ -89,7 +86,7 @@ public class GitHubCommand implements Command {
"",
"commands.misc.github.connect.description",
"(https://github.com/login/oauth/authorize?client_id=25321f690bb1b6952942)")
- .build()).queue(); */
+ .build()).queue();
}
}
diff --git a/src/main/java/com/bbn/hadder/commands/music/BassCommand.java b/src/main/java/com/bbn/hadder/commands/music/BassCommand.java
deleted file mode 100644
index c227118..0000000
--- a/src/main/java/com/bbn/hadder/commands/music/BassCommand.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- @author Hax / Hax6775 / Schlauer_Hax
- */
-
-package com.bbn.hadder.commands.music;
-
-import com.bbn.hadder.commands.Command;
-import com.bbn.hadder.commands.CommandEvent;
-import com.bbn.hadder.utils.MessageEditor;
-import com.sedmelluq.discord.lavaplayer.filter.equalizer.EqualizerFactory;
-
-public class BassCommand implements Command {
- private static final float[] BASS_BOOST = { 0.2f, 0.15f, 0.1f, 0.05f, 0.0f, -0.05f, -0.1f, -0.1f, -0.1f, -0.1f, -0.1f,
- -0.1f, -0.1f, -0.1f, -0.1f };
-
- @Override
- public void executed(String[] args, CommandEvent event) {
- if (args.length > 0) {
- if (event.getAudioManager().hasPlayer(event.getGuild()) && event.getAudioManager().getPlayer(event.getGuild()).getPlayingTrack() != null) {
- if (event.getMember().getVoiceState().inVoiceChannel() && event.getGuild().getSelfMember().getVoiceState().inVoiceChannel() && event.getGuild().getSelfMember().getVoiceState().getChannel().equals(event.getMember().getVoiceState().getChannel())) {
- float value = Float.parseFloat(args[0]);
- EqualizerFactory equalizer = new EqualizerFactory();
- for (int i = 0; i < BASS_BOOST.length; i++) {
- equalizer.setGain(i, BASS_BOOST[i] + value);
- }
- event.getAudioManager().getPlayer(event.getGuild()).setFrameBufferDuration(500);
- event.getAudioManager().getPlayer(event.getGuild()).setFilterFactory(equalizer);
- } else {
- event.getTextChannel().sendMessage(event.getMessageEditor().getMessage(MessageEditor.MessageType.ERROR,
- "commands.music.bass.error.connected.title",
- "commands.music.bass.error.connected.description")
- .build()).queue();
- }
- } else {
- event.getTextChannel().sendMessage(event.getMessageEditor().getMessage(MessageEditor.MessageType.ERROR,
- "commands.music.info.error.title",
- "commands.music.info.error.description").build()).queue();
- }
- } else event.getHelpCommand().sendHelp(this, event);
- }
-
- @Override
- public String[] labels() {
- return new String[]{"bass"};
- }
-
- @Override
- public String description() {
- return "commands.music.bass.help.description";
- }
-
- @Override
- public String usage() {
- return "[Bass-Level]";
- }
-
- @Override
- public String example() {
- return "1000";
- }
-}
diff --git a/src/main/java/com/bbn/hadder/commands/music/VolumeCommand.java b/src/main/java/com/bbn/hadder/commands/music/VolumeCommand.java
index b39fbf2..a7d3546 100644
--- a/src/main/java/com/bbn/hadder/commands/music/VolumeCommand.java
+++ b/src/main/java/com/bbn/hadder/commands/music/VolumeCommand.java
@@ -35,7 +35,7 @@ public class VolumeCommand implements Command {
} else {
event.getTextChannel().sendMessage(event.getMessageEditor().getMessage(MessageEditor.MessageType.ERROR,
"commands.music.volume.error.connected.title",
- "commands.music.volume.error.connected.description")
+ "commands.volume.stop.error.connected.description")
.build()).queue();
}
} else {
diff --git a/src/main/java/com/bbn/hadder/listener/MentionListener.java b/src/main/java/com/bbn/hadder/listener/MentionListener.java
index cd14129..238b2d8 100644
--- a/src/main/java/com/bbn/hadder/listener/MentionListener.java
+++ b/src/main/java/com/bbn/hadder/listener/MentionListener.java
@@ -13,6 +13,7 @@ public class MentionListener extends ListenerAdapter {
private Rethink rethink;
+
public MentionListener(Rethink rethink) {
this.rethink = rethink;
}
diff --git a/src/main/resources/Translations/Translations_de.properties b/src/main/resources/Translations/Translations_de.properties
index 41eee21..d1aaab0 100644
--- a/src/main/resources/Translations/Translations_de.properties
+++ b/src/main/resources/Translations/Translations_de.properties
@@ -174,6 +174,9 @@ commands.moderation.editrules.success.title = Successfully changed
commands.moderation.editrules.success.description = I successfully changed the rules
commands.moderation.editrules.help.description = Edits the rules message.
+commands.music.bass.error.connected.title = No channel
+commands.music.bass.error.connected.description = You have to be in the same voice channel as the bot to change the bass level.
+commands.music.bass.help.description = Change the bass for the song which is played at the moment.
commands.music.join.success.title = Successfully connected
commands.music.join.success.description = Ich habe mich erfolgreich mit %extra% verbunden.
commands.music.join.error.connecting.already.title = Already connected
diff --git a/src/main/resources/Translations/Translations_es.properties b/src/main/resources/Translations/Translations_es.properties
index 9167e2d..5ca0715 100644
--- a/src/main/resources/Translations/Translations_es.properties
+++ b/src/main/resources/Translations/Translations_es.properties
@@ -174,6 +174,9 @@ commands.moderation.editrules.success.title = Successfully changed
commands.moderation.editrules.success.description = I successfully changed the rules
commands.moderation.editrules.help.description = Edits the rules message.
+commands.music.bass.error.connected.title = No channel
+commands.music.bass.error.connected.description = You have to be in the same voice channel as the bot to change the bass level.
+commands.music.bass.help.description = Change the bass for the song which is played at the moment.
commands.music.join.success.title = Successfully connected
commands.music.join.success.description = I successfully connected to %extra%.
commands.music.join.error.connecting.already.title = Already connected
diff --git a/src/main/resources/Translations/Translations_fr.properties b/src/main/resources/Translations/Translations_fr.properties
index 9167e2d..5ca0715 100644
--- a/src/main/resources/Translations/Translations_fr.properties
+++ b/src/main/resources/Translations/Translations_fr.properties
@@ -174,6 +174,9 @@ commands.moderation.editrules.success.title = Successfully changed
commands.moderation.editrules.success.description = I successfully changed the rules
commands.moderation.editrules.help.description = Edits the rules message.
+commands.music.bass.error.connected.title = No channel
+commands.music.bass.error.connected.description = You have to be in the same voice channel as the bot to change the bass level.
+commands.music.bass.help.description = Change the bass for the song which is played at the moment.
commands.music.join.success.title = Successfully connected
commands.music.join.success.description = I successfully connected to %extra%.
commands.music.join.error.connecting.already.title = Already connected
diff --git a/src/main/resources/Translations/Translations_ru.properties b/src/main/resources/Translations/Translations_ru.properties
index 9167e2d..5ca0715 100644
--- a/src/main/resources/Translations/Translations_ru.properties
+++ b/src/main/resources/Translations/Translations_ru.properties
@@ -174,6 +174,9 @@ commands.moderation.editrules.success.title = Successfully changed
commands.moderation.editrules.success.description = I successfully changed the rules
commands.moderation.editrules.help.description = Edits the rules message.
+commands.music.bass.error.connected.title = No channel
+commands.music.bass.error.connected.description = You have to be in the same voice channel as the bot to change the bass level.
+commands.music.bass.help.description = Change the bass for the song which is played at the moment.
commands.music.join.success.title = Successfully connected
commands.music.join.success.description = I successfully connected to %extra%.
commands.music.join.error.connecting.already.title = Already connected
diff --git a/src/main/resources/Translations/Translations_tr.properties b/src/main/resources/Translations/Translations_tr.properties
index 9167e2d..5ca0715 100644
--- a/src/main/resources/Translations/Translations_tr.properties
+++ b/src/main/resources/Translations/Translations_tr.properties
@@ -174,6 +174,9 @@ commands.moderation.editrules.success.title = Successfully changed
commands.moderation.editrules.success.description = I successfully changed the rules
commands.moderation.editrules.help.description = Edits the rules message.
+commands.music.bass.error.connected.title = No channel
+commands.music.bass.error.connected.description = You have to be in the same voice channel as the bot to change the bass level.
+commands.music.bass.help.description = Change the bass for the song which is played at the moment.
commands.music.join.success.title = Successfully connected
commands.music.join.success.description = I successfully connected to %extra%.
commands.music.join.error.connecting.already.title = Already connected
diff --git a/src/main/resources/Translations/Translations_zh.properties b/src/main/resources/Translations/Translations_zh.properties
index 9167e2d..5ca0715 100644
--- a/src/main/resources/Translations/Translations_zh.properties
+++ b/src/main/resources/Translations/Translations_zh.properties
@@ -174,6 +174,9 @@ commands.moderation.editrules.success.title = Successfully changed
commands.moderation.editrules.success.description = I successfully changed the rules
commands.moderation.editrules.help.description = Edits the rules message.
+commands.music.bass.error.connected.title = No channel
+commands.music.bass.error.connected.description = You have to be in the same voice channel as the bot to change the bass level.
+commands.music.bass.help.description = Change the bass for the song which is played at the moment.
commands.music.join.success.title = Successfully connected
commands.music.join.success.description = I successfully connected to %extra%.
commands.music.join.error.connecting.already.title = Already connected