From 55068988e2e8eacbd3d44f1ca992a9c85f24fa6e Mon Sep 17 00:00:00 2001 From: Strengthless Date: Fri, 14 Feb 2025 14:50:10 +0100 Subject: fix: `has_lines` returns empty str instead of bool --- bot/utils/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/utils/helpers.py b/bot/utils/helpers.py index 7b5474a2f..4a85f46f5 100644 --- a/bot/utils/helpers.py +++ b/bot/utils/helpers.py @@ -25,7 +25,7 @@ def has_lines(string: str, count: int) -> bool: split = string.split("\n", count - 1) # Make sure the last part isn't empty, which would happen if there was a final newline. - return split[-1] and len(split) == count + return split[-1] != "" and len(split) == count def pad_base64(data: str) -> str: -- cgit v1.2.3