Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- volume = min(60, max(30, volume))
- volume = min(configParser.get('config_searchandplay', 'volume_max'), max(configParser.get('config_searchandplay', 'volume_min'), volume)) #Max Volume Spam Protection
- [config_searchandplay]
- #Volume Protection
- volume_max = 90
- volume_min = 10
- vol_max = int(configParser.get('config_searchandplay', 'volume_max'))
- vol_min = int(configParser.get('config_searchandplay', 'volume_min'))
- volume = min(vol_max, max(vol_min, volume))
- vol_max = configParser.getint('config_searchandplay', 'volume_max')
- vol_min = configParser.getint('config_searchandplay', 'volume_min')
- >>> min(u'90',u'10')
- u'10'
- >>> min(u'9',u'10')
- u'10'
- >>> min(int(u'9'),(u'90'))
- 9
- ConfigParser.getint(section, option)
- volume = min(configParser.getint('config_searchandplay', 'volume_max'), max(configParser.getint('config_searchandplay', 'volume_min'), volume)) #Max Volume Spam Protection
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement