From c8833f5bb9b572b59732d7ecde56395c3c3466e4 Mon Sep 17 00:00:00 2001 From: Skidder Date: Mon, 13 Jan 2020 16:40:46 +0100 Subject: [PATCH 01/13] New translations Translations_en.properties (German) New German translation --- src/main/resources/Translations/Translations_de.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/Translations/Translations_de.properties b/src/main/resources/Translations/Translations_de.properties index eba82b7..a14cff2 100644 --- a/src/main/resources/Translations/Translations_de.properties +++ b/src/main/resources/Translations/Translations_de.properties @@ -176,7 +176,7 @@ commands.music.join.error.connecting.already.title = Already connected commands.music.join.error.connecting.already.description = I am already connected to your voice channel commands.music.join.error.connecting.trying.title = Already trying to connect commands.music.join.error.connecting.trying.description = Hadder is already trying to connect. Please wait a moment -commands.music.join.error.channel.title = No Voice Channel +commands.music.join.error.channel.title = Kein Sprachkanal commands.music.join.error.channel.description = You aren't in a Voice Channel. commands.music.join.error.permission.title = No permission commands.music.join.error.permission.description = I am not allowed to join your voice channel. From 5ee7157e9ae67dca25ce2c96c304b9b4edad4589 Mon Sep 17 00:00:00 2001 From: Skidder Date: Mon, 13 Jan 2020 16:50:42 +0100 Subject: [PATCH 02/13] New translations Translations_en.properties (German) New German translation --- .../resources/Translations/Translations_de.properties | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/Translations/Translations_de.properties b/src/main/resources/Translations/Translations_de.properties index a14cff2..850e6f7 100644 --- a/src/main/resources/Translations/Translations_de.properties +++ b/src/main/resources/Translations/Translations_de.properties @@ -121,12 +121,12 @@ commands.moderation.regionchange.regions.title = Alle Regionen commands.moderation.regionchange.success.title = Region erfolgreich gesetzt commands.moderation.regionchange.success.description = Ich habe die neue Serverregion erfolgreich zu %extra% geändert. commands.moderation.regionchange.help.description = Changes the server region to locked regions. -commands.moderation.role.add.success.title = Successfully added role(s) +commands.moderation.role.add.success.title = Rolle(n) erfolgreich hinzugefügt commands.moderation.role.add.success.description = Ich habe %extra% Rollen zu %extra_two% Mitgliedern hinzugefügt. -commands.moderation.role.remove.success.title = Successfully removed role(s) +commands.moderation.role.remove.success.title = Rolle(n) erfolgreich entfernt commands.moderation.role.remove.success.description = Ich habe %extra% Rollen von %extra_two% Mitgliedern entfernt. -commands.moderation.role.help.description = Adds and removes one or more role(s) from one or more user(s) -commands.moderation.rules.setup.title = Set up rules +commands.moderation.role.help.description = Fügt und entfernt eine oder mehrere Rolle(n) von einem oder mehreren Benutzer(n) hinzu +commands.moderation.rules.setup.title = Richte Regeln ein commands.moderation.rules.setup.description = Welcome to the Hadder rules setup. Please mention the channel in which I should send the rules. Your message should look like\: \#rules or \#verify. commands.moderation.rules.channel.error.title = Kanal konnte nicht gefunden werden commands.moderation.rules.channel.error.description = Ich kann den angegebenen Kanal nicht finden. Bitte starte das Setup erneut. From 3ffadfcafa086f05486ac8d31578578ea2ce92bd Mon Sep 17 00:00:00 2001 From: Skidder Date: Mon, 13 Jan 2020 17:00:35 +0100 Subject: [PATCH 03/13] New translations Translations_en.properties (German) New German translation --- .../Translations/Translations_de.properties | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/resources/Translations/Translations_de.properties b/src/main/resources/Translations/Translations_de.properties index 850e6f7..a86f945 100644 --- a/src/main/resources/Translations/Translations_de.properties +++ b/src/main/resources/Translations/Translations_de.properties @@ -171,13 +171,13 @@ commands.moderation.editrules.success.description = I successfully changed the r commands.moderation.editrules.help.description = Edits the rules message. commands.music.join.success.title = Successfully connected -commands.music.join.success.description = I successfully connected to %extra%. +commands.music.join.success.description = Ich habe mich erfolgreich mit %extra% verbunden. commands.music.join.error.connecting.already.title = Already connected -commands.music.join.error.connecting.already.description = I am already connected to your voice channel -commands.music.join.error.connecting.trying.title = Already trying to connect -commands.music.join.error.connecting.trying.description = Hadder is already trying to connect. Please wait a moment +commands.music.join.error.connecting.already.description = Ich bin bereits mit deinem Sprachkanal verbunden +commands.music.join.error.connecting.trying.title = Verbindung wird bereits hergestellt +commands.music.join.error.connecting.trying.description = Hadder versucht bereits, sich zu verbinden. Bitte warten Sie einen Moment commands.music.join.error.channel.title = Kein Sprachkanal -commands.music.join.error.channel.description = You aren't in a Voice Channel. +commands.music.join.error.channel.description = Du befindest dich nicht in einem Sprachkanal. commands.music.join.error.permission.title = No permission commands.music.join.error.permission.description = I am not allowed to join your voice channel. commands.music.join.help.description = Tritt deinem Sprachkanal bei. @@ -226,7 +226,7 @@ commands.music.skip.help.description = Überspringt den gerade abgespielten Song commands.music.volume.success.title = Successfully set commands.music.volume.success.description = I successfully set the new volume to %extra% commands.music.volume.error.int.title = Invalid number -commands.music.volume.error.int.description = The volume have to be between 1 and 200 +commands.music.volume.error.int.description = Die Lautstärke muss zwischen 1 und 200 liegen commands.music.volume.error.connected.title = No channel commands.music.volume.error.connected.description = You have to be in the same voice channel as the bot to change the volume. commands.music.volume.help.description = Change the volume of the music. From b39bd971cc6eb304dc89ad8d370d6826262a6b07 Mon Sep 17 00:00:00 2001 From: Skidder Date: Mon, 13 Jan 2020 20:35:24 +0100 Subject: [PATCH 04/13] Update README.md --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 11518a2..d41835c 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,6 @@ Hadder Discord is a multi-purpose Discord bot with 100% uptime. Skidder#6775
Hax#6775 -### Designer -TopComp#1288 - ## A few commands | **Command** | **Description** | |----------------|---------------------------------------------------------------| From a9eed621fd2e3b0286be22b6d27d7b4bc930aacf Mon Sep 17 00:00:00 2001 From: Skidder Date: Mon, 13 Jan 2020 20:40:04 +0100 Subject: [PATCH 05/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d41835c..f7a3ccf 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Hax#6775 | h.help | Shows each command and explains its usage. | | h.about | Shows information about Hadder. | | h.equals | Checks if two strings are the same. | -| h.invite | Shows the invitation link to invite Hadder to your server. | +| h.invite | Shows the invite link to invite Hadder to your server. | | h.ping | Shows the ping to the Discord API. | | h.avatar | Sends the avatar of the specified member. | | h.gif | Looks for a GIF on Giphy. | From 1b234138f9ce8f7239c8321c906a3c6495ee9516 Mon Sep 17 00:00:00 2001 From: Skidder Date: Tue, 14 Jan 2020 21:01:14 +0100 Subject: [PATCH 06/13] New translations Translations_en.properties (German) New German translation --- src/main/resources/Translations/Translations_de.properties | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/resources/Translations/Translations_de.properties b/src/main/resources/Translations/Translations_de.properties index a86f945..41eee21 100644 --- a/src/main/resources/Translations/Translations_de.properties +++ b/src/main/resources/Translations/Translations_de.properties @@ -153,6 +153,10 @@ commands.moderation.rules.success.title = Successfully set the rules commands.moderation.rules.success.description = I successfully send the rules in %extra%. commands.moderation.rules.error.message.title = Can't write messages commands.moderation.rules.error.message.description = I can not write messages in the specified channel +commands.moderation.rules.error.permission.title = No permission +commands.moderation.rules.error.permission.description = To execute this command, I need the `MANAGE_ROLES` permission. +commands.moderation.rules.error.interact.title = Can't interact +commands.moderation.rules.error.interact.description = I can not interact with the specified role. Make sure my role is higher than the specified role. commands.moderation.rules.help.description = Setup the rules on your Discord server commands.moderation.starboard.success.title = Successfully set the Channel\! commands.moderation.starboard.help.description = Sets the starboard channel. From 779578291270d85302f23d6b7937e9038caf90ca Mon Sep 17 00:00:00 2001 From: Skidder Date: Tue, 14 Jan 2020 21:01:15 +0100 Subject: [PATCH 07/13] New translations Translations_en.properties (English) New English translation --- src/main/resources/Translations/Translations_en.properties | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/resources/Translations/Translations_en.properties b/src/main/resources/Translations/Translations_en.properties index fe25ac6..9167e2d 100644 --- a/src/main/resources/Translations/Translations_en.properties +++ b/src/main/resources/Translations/Translations_en.properties @@ -153,6 +153,10 @@ commands.moderation.rules.success.title = Successfully set the rules commands.moderation.rules.success.description = I successfully send the rules in %extra%. commands.moderation.rules.error.message.title = Can't write messages commands.moderation.rules.error.message.description = I can not write messages in the specified channel +commands.moderation.rules.error.permission.title = No permission +commands.moderation.rules.error.permission.description = To execute this command, I need the `MANAGE_ROLES` permission. +commands.moderation.rules.error.interact.title = Can't interact +commands.moderation.rules.error.interact.description = I can not interact with the specified role. Make sure my role is higher than the specified role. commands.moderation.rules.help.description = Setup the rules on your Discord server commands.moderation.starboard.success.title = Successfully set the Channel\! commands.moderation.starboard.help.description = Sets the starboard channel. From c36911206f3a26d3cc9bc1a2d89bcb0df55cccd8 Mon Sep 17 00:00:00 2001 From: Skidder Date: Tue, 14 Jan 2020 21:01:16 +0100 Subject: [PATCH 08/13] New translations Translations_en.properties (Spanish) New Spanish translation --- src/main/resources/Translations/Translations_es.properties | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/resources/Translations/Translations_es.properties b/src/main/resources/Translations/Translations_es.properties index fe25ac6..9167e2d 100644 --- a/src/main/resources/Translations/Translations_es.properties +++ b/src/main/resources/Translations/Translations_es.properties @@ -153,6 +153,10 @@ commands.moderation.rules.success.title = Successfully set the rules commands.moderation.rules.success.description = I successfully send the rules in %extra%. commands.moderation.rules.error.message.title = Can't write messages commands.moderation.rules.error.message.description = I can not write messages in the specified channel +commands.moderation.rules.error.permission.title = No permission +commands.moderation.rules.error.permission.description = To execute this command, I need the `MANAGE_ROLES` permission. +commands.moderation.rules.error.interact.title = Can't interact +commands.moderation.rules.error.interact.description = I can not interact with the specified role. Make sure my role is higher than the specified role. commands.moderation.rules.help.description = Setup the rules on your Discord server commands.moderation.starboard.success.title = Successfully set the Channel\! commands.moderation.starboard.help.description = Sets the starboard channel. From 10ab3d75d19f240eb01e76d882e8ec52318add11 Mon Sep 17 00:00:00 2001 From: Skidder Date: Tue, 14 Jan 2020 21:01:18 +0100 Subject: [PATCH 09/13] New translations Translations_en.properties (French) New French translation --- src/main/resources/Translations/Translations_fr.properties | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/resources/Translations/Translations_fr.properties b/src/main/resources/Translations/Translations_fr.properties index fe25ac6..9167e2d 100644 --- a/src/main/resources/Translations/Translations_fr.properties +++ b/src/main/resources/Translations/Translations_fr.properties @@ -153,6 +153,10 @@ commands.moderation.rules.success.title = Successfully set the rules commands.moderation.rules.success.description = I successfully send the rules in %extra%. commands.moderation.rules.error.message.title = Can't write messages commands.moderation.rules.error.message.description = I can not write messages in the specified channel +commands.moderation.rules.error.permission.title = No permission +commands.moderation.rules.error.permission.description = To execute this command, I need the `MANAGE_ROLES` permission. +commands.moderation.rules.error.interact.title = Can't interact +commands.moderation.rules.error.interact.description = I can not interact with the specified role. Make sure my role is higher than the specified role. commands.moderation.rules.help.description = Setup the rules on your Discord server commands.moderation.starboard.success.title = Successfully set the Channel\! commands.moderation.starboard.help.description = Sets the starboard channel. From 31fcd95da8e41f11ffab71b49b0d6c4c8851c421 Mon Sep 17 00:00:00 2001 From: Skidder Date: Tue, 14 Jan 2020 21:01:20 +0100 Subject: [PATCH 10/13] New translations Translations_en.properties (Russian) New Russian translation --- src/main/resources/Translations/Translations_ru.properties | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/resources/Translations/Translations_ru.properties b/src/main/resources/Translations/Translations_ru.properties index fe25ac6..9167e2d 100644 --- a/src/main/resources/Translations/Translations_ru.properties +++ b/src/main/resources/Translations/Translations_ru.properties @@ -153,6 +153,10 @@ commands.moderation.rules.success.title = Successfully set the rules commands.moderation.rules.success.description = I successfully send the rules in %extra%. commands.moderation.rules.error.message.title = Can't write messages commands.moderation.rules.error.message.description = I can not write messages in the specified channel +commands.moderation.rules.error.permission.title = No permission +commands.moderation.rules.error.permission.description = To execute this command, I need the `MANAGE_ROLES` permission. +commands.moderation.rules.error.interact.title = Can't interact +commands.moderation.rules.error.interact.description = I can not interact with the specified role. Make sure my role is higher than the specified role. commands.moderation.rules.help.description = Setup the rules on your Discord server commands.moderation.starboard.success.title = Successfully set the Channel\! commands.moderation.starboard.help.description = Sets the starboard channel. From c84fdc3f4a74c3d82e9b27330e0eedc3d474a2f4 Mon Sep 17 00:00:00 2001 From: Skidder Date: Tue, 14 Jan 2020 21:01:21 +0100 Subject: [PATCH 11/13] New translations Translations_en.properties (Turkish) New Turkish translation --- src/main/resources/Translations/Translations_tr.properties | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/resources/Translations/Translations_tr.properties b/src/main/resources/Translations/Translations_tr.properties index fe25ac6..9167e2d 100644 --- a/src/main/resources/Translations/Translations_tr.properties +++ b/src/main/resources/Translations/Translations_tr.properties @@ -153,6 +153,10 @@ commands.moderation.rules.success.title = Successfully set the rules commands.moderation.rules.success.description = I successfully send the rules in %extra%. commands.moderation.rules.error.message.title = Can't write messages commands.moderation.rules.error.message.description = I can not write messages in the specified channel +commands.moderation.rules.error.permission.title = No permission +commands.moderation.rules.error.permission.description = To execute this command, I need the `MANAGE_ROLES` permission. +commands.moderation.rules.error.interact.title = Can't interact +commands.moderation.rules.error.interact.description = I can not interact with the specified role. Make sure my role is higher than the specified role. commands.moderation.rules.help.description = Setup the rules on your Discord server commands.moderation.starboard.success.title = Successfully set the Channel\! commands.moderation.starboard.help.description = Sets the starboard channel. From aad650f31aac1d8583caecf24c77508a05703d1e Mon Sep 17 00:00:00 2001 From: Skidder Date: Tue, 14 Jan 2020 21:01:23 +0100 Subject: [PATCH 12/13] New translations Translations_en.properties (Chinese Simplified) New Chinese Simplified translation --- src/main/resources/Translations/Translations_zh.properties | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/resources/Translations/Translations_zh.properties b/src/main/resources/Translations/Translations_zh.properties index fe25ac6..9167e2d 100644 --- a/src/main/resources/Translations/Translations_zh.properties +++ b/src/main/resources/Translations/Translations_zh.properties @@ -153,6 +153,10 @@ commands.moderation.rules.success.title = Successfully set the rules commands.moderation.rules.success.description = I successfully send the rules in %extra%. commands.moderation.rules.error.message.title = Can't write messages commands.moderation.rules.error.message.description = I can not write messages in the specified channel +commands.moderation.rules.error.permission.title = No permission +commands.moderation.rules.error.permission.description = To execute this command, I need the `MANAGE_ROLES` permission. +commands.moderation.rules.error.interact.title = Can't interact +commands.moderation.rules.error.interact.description = I can not interact with the specified role. Make sure my role is higher than the specified role. commands.moderation.rules.help.description = Setup the rules on your Discord server commands.moderation.starboard.success.title = Successfully set the Channel\! commands.moderation.starboard.help.description = Sets the starboard channel. From 054d967b708f7b335749434f7190f6974a5a0184 Mon Sep 17 00:00:00 2001 From: Hax Date: Thu, 16 Jan 2020 21:00:54 +0100 Subject: [PATCH 13/13] Vom Bra muss der Benzer --- src/main/java/com/bbn/hadder/Hadder.java | 3 +- .../com/bbn/hadder/audio/AudioManager.java | 1 + .../hadder/commands/music/BassCommand.java | 48 +++++++++++++++++++ 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/bbn/hadder/commands/music/BassCommand.java diff --git a/src/main/java/com/bbn/hadder/Hadder.java b/src/main/java/com/bbn/hadder/Hadder.java index b4a6cbb..0494551 100644 --- a/src/main/java/com/bbn/hadder/Hadder.java +++ b/src/main/java/com/bbn/hadder/Hadder.java @@ -103,7 +103,8 @@ public class Hadder { new StopCommand(), new BlacklistCommand(), new PauseCommand(), - new LoopCommand()), config, helpCommand); + new LoopCommand(), + new BassCommand()), config, helpCommand); builder.addEventListeners( new MentionListener(rethink), diff --git a/src/main/java/com/bbn/hadder/audio/AudioManager.java b/src/main/java/com/bbn/hadder/audio/AudioManager.java index 6dd6f18..4e7b730 100644 --- a/src/main/java/com/bbn/hadder/audio/AudioManager.java +++ b/src/main/java/com/bbn/hadder/audio/AudioManager.java @@ -30,6 +30,7 @@ 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/commands/music/BassCommand.java b/src/main/java/com/bbn/hadder/commands/music/BassCommand.java new file mode 100644 index 0000000..1b7b4de --- /dev/null +++ b/src/main/java/com/bbn/hadder/commands/music/BassCommand.java @@ -0,0 +1,48 @@ +/* + * @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.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==1) { + 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); + event.getTextChannel().sendMessage("Bruh, set dae bass").queue(); + } + } + + @Override + public String[] labels() { + return new String[]{"bass"}; + } + + @Override + public String description() { + return null; + } + + @Override + public String usage() { + return null; + } + + @Override + public String example() { + return null; + } +}