aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/info/tags.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/exts/info/tags.py b/bot/exts/info/tags.py
index 0fc6e99d0..3d222933a 100644
--- a/bot/exts/info/tags.py
+++ b/bot/exts/info/tags.py
@@ -109,6 +109,9 @@ class Tag:
def _fuzzy_search(search: str, target: str) -> float:
"""A simple scoring algorithm based on how many letters are found / total, with order in mind."""
_search = REGEX_NON_ALPHABET.sub("", search.lower())
+ if not _search:
+ return 0
+
_targets = iter(REGEX_NON_ALPHABET.split(target.lower()))
current = 0