Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Increase max volume input #265

Open
TheGranster opened this issue Aug 18, 2019 · 5 comments

Comments

@TheGranster
Copy link

commented Aug 18, 2019

Me and my friends loved to ear rape each other by setting the volume on our old music bot to some absurd number, but that music bot is now offline forever and no other bots seem to have this feature, so I'd love for you to implement unlimited volume input, at least as an optional setting perhaps, rather than capping at 150.

I'm hoping this would be a relatively easy fix, as I assume it is just changing the boundaries of the acceptable input for volume commands.

Thanks bro, your bot is awesome.

@jagrosh jagrosh added the enhancement label Aug 19, 2019

@hazebooth

This comment has been minimized.

Copy link

commented Sep 1, 2019

This is possible (and I actually have a custom build to allow this). I can submit a patch file here for you to apply, but I think the hard limit it a sane default.

@TheGranster

This comment has been minimized.

Copy link
Author

commented Sep 1, 2019

That would be amazing if you could thanks :)

@hazebooth

This comment has been minimized.

Copy link

commented Sep 11, 2019

@TheGranster

diff --git a/../temp.java b/src/main/java/com/jagrosh/jmusicbot/commands/dj/VolumeCmd.java
index 9511b88..40acb7e 100644
--- a/../temp.java
+++ b/src/main/java/com/jagrosh/jmusicbot/commands/dj/VolumeCmd.java
@@ -34,7 +34,7 @@ public class VolumeCmd extends DJCommand
         this.name = "volume";
         this.aliases = new String[]{"vol"};
         this.help = "sets or shows volume";
+        this.arguments = "[any positive integer]";
-        this.arguments = "[0-150]";
     }
 
     @Override
@@ -55,8 +55,8 @@ public class VolumeCmd extends DJCommand
             }catch(NumberFormatException e){
                 nvolume = -1;
             }
+            if(nvolume<0)
+                event.reply(event.getClient().getError()+" Volume must be a valid integer above 0!");
-            if(nvolume<0 || nvolume>150)
-                event.reply(event.getClient().getError()+" Volume must be a valid integer between 0 and 150!");
             else
             {
                 handler.getPlayer().setVolume(nvolume);
@Sanduhr32

This comment has been minimized.

Copy link
Contributor

commented Sep 11, 2019

@TheGranster

+        this.arguments = "[any positive integer]";
-        this.arguments = "[0-150]";
 
+            if(nvolume<0)
+                event.reply(event.getClient().getError()+" Volume must be a valid integer above 0!");

Do you even know how much that possibly can slow the music playing down and how critical overflowing the volume can be if you do it several times? Rather make it a variable and add a config entry where you have to enter a specific phrase that allows u to set the volume max to 300% even tho I wouldn't recommend anything above 200% because dramatic ear raping may occur.

@hazebooth

This comment has been minimized.

Copy link

commented Sep 11, 2019

I gave him a simple patch that let him set the volume to a number above the default threshold you set. I did not want to spend X amount of time writing up a config entry XYZ. This does what he wants it to do (including the damage, specifically what he asked for -_-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.