discord-bot/math_utils.py
Nicba1010 52d9b19ea0 Log Analysis Implementation
7Z Stream reader is broken
Zip Stream reader doesn't exist
Supported formats:
 - .gz
 - .log

Add manual library load report.
Last problems still not fixed.

Disable .zip and .7z logs.
Turn on feedback for invalid/non-tested serials.

Fixup

Log Analysis
2018-02-15 20:05:00 +01:00

10 lines
280 B
Python

def limit_int(amount: int, high: int, low: int = 0) -> int:
"""
Limits an integer.
:param amount: amount
:param high: high limit
:param low: low limit
:return: limited integer
"""
return low if amount < low else (high if amount > high else amount)