forked from ChrisChrome/weather-bot
		
	Add max volume. Not limiting it was a horrible idea
This commit is contained in:
		
							parent
							
								
									8436139593
								
							
						
					
					
						commit
						7f8abdf079
					
				
							
								
								
									
										1
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								index.js
									
									
									
									
									
								
							|  | @ -969,6 +969,7 @@ discord.on("interactionCreate", async (interaction) => { | ||||||
| 					volume = interaction.options.getInteger("volume")/100; | 					volume = interaction.options.getInteger("volume")/100; | ||||||
| 					// Make sure volume isnt negative
 | 					// Make sure volume isnt negative
 | ||||||
| 					if (volume < 0) volume = 0; | 					if (volume < 0) volume = 0; | ||||||
|  | 					if (volume > 1) volume = 1; | ||||||
| 					res = setVolume(channel, volume) | 					res = setVolume(channel, volume) | ||||||
| 					if (res) { | 					if (res) { | ||||||
| 						interaction.reply({ content: `Set volume to ${volume*100}%` }); | 						interaction.reply({ content: `Set volume to ${volume*100}%` }); | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue