fix: time_int in ban_time remove whitespace

This commit is contained in:
Qurbonsaid
2024-10-25 19:42:29 +05:00
committed by GitHub
parent 8d9418eb78
commit c8d2cdfdfd

View File

@@ -26,7 +26,7 @@ def ban_time(time_str):
if not any(time_str.endswith(unit) for unit in ("s", "m", "h", "d")):
time_str += "s"
unit = time_str[-1]
time_int = time_str[:-1]
time_int = time_str[:-1].strip()
if not time_int.isdigit():
raise Exception("Invalid time amount specified.")
to_return = ""