mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Fix typo which allowed arbitrary volumes
This commit is contained in:
parent
7a82c9ec68
commit
e1c4edba9f
4
red.py
4
red.py
@ -1131,7 +1131,7 @@ async def setVolume(message):
|
|||||||
msg = msg.split(" ")
|
msg = msg.split(" ")
|
||||||
try:
|
try:
|
||||||
vol = float(msg[1])
|
vol = float(msg[1])
|
||||||
if vol >= 0 or vol <= 1:
|
if vol >= 0 and vol <= 1:
|
||||||
settings["VOLUME"] = vol
|
settings["VOLUME"] = vol
|
||||||
await(client.send_message(message.channel, "`Volume set. Next track will have the desired volume.`"))
|
await(client.send_message(message.channel, "`Volume set. Next track will have the desired volume.`"))
|
||||||
dataIO.fileIO("settings.json", "save", settings)
|
dataIO.fileIO("settings.json", "save", settings)
|
||||||
@ -1519,4 +1519,4 @@ if __name__ == '__main__':
|
|||||||
except:
|
except:
|
||||||
loop.run_until_complete(client.logout())
|
loop.run_until_complete(client.logout())
|
||||||
finally:
|
finally:
|
||||||
loop.close()
|
loop.close()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user