From e1c4edba9f95821c38b257e61856f1a8531f5376 Mon Sep 17 00:00:00 2001 From: Alex Sadler Date: Fri, 8 Jan 2016 15:14:06 +0000 Subject: [PATCH] Fix typo which allowed arbitrary volumes --- red.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/red.py b/red.py index fe640d76b..767c85ab6 100644 --- a/red.py +++ b/red.py @@ -1131,7 +1131,7 @@ async def setVolume(message): msg = msg.split(" ") try: vol = float(msg[1]) - if vol >= 0 or vol <= 1: + if vol >= 0 and vol <= 1: settings["VOLUME"] = vol await(client.send_message(message.channel, "`Volume set. Next track will have the desired volume.`")) dataIO.fileIO("settings.json", "save", settings) @@ -1519,4 +1519,4 @@ if __name__ == '__main__': except: loop.run_until_complete(client.logout()) finally: - loop.close() \ No newline at end of file + loop.close()