Skip to content

Commit

Permalink
Merge pull request #583 from The-4th-Hokage/deepsource-fix-de01bac1
Browse files Browse the repository at this point in the history
Use `max` built-in to get the maximum of two values
  • Loading branch information
Dhruvacube authored Apr 9, 2022
2 parents 5492cba + 48659db commit 181382f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions minato_namikaze/cogs/music.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ async def volume(self, ctx, vol: Union[int, float]):
"""
player = self.bot.music.get_player(guild_id=ctx.guild.id)
vol = abs(vol)
if vol < 0:
vol = 0
vol = max(vol, 0)
if vol > 100:
return await ctx.send(embed=ErrorEmbed(description='The volume should be between 0 and 100'))
# volume should be a float between 0 to 1
Expand Down

0 comments on commit 181382f

Please sign in to comment.