diff --git a/README.md b/README.md index 11518a2..f7a3ccf 100644 --- a/README.md +++ b/README.md @@ -20,16 +20,13 @@ Hadder Discord is a multi-purpose Discord bot with 100% uptime. Skidder#6775
Hax#6775 -### Designer -TopComp#1288 - ## A few commands | **Command** | **Description** | |----------------|---------------------------------------------------------------| | 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. | 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; + } +} diff --git a/src/main/resources/Translations/Translations_de.properties b/src/main/resources/Translations/Translations_de.properties index eba82b7..41eee21 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. @@ -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. @@ -171,13 +175,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.channel.title = No Voice Channel -commands.music.join.error.channel.description = You aren't in a Voice Channel. +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 = 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 +230,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. 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. 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. 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. 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. 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.