diff --git a/ryan/exts/corona.py b/ryan/exts/corona.py index e3b268e..5db2cc8 100644 --- a/ryan/exts/corona.py +++ b/ryan/exts/corona.py @@ -126,6 +126,10 @@ def lookup(self, name: str) -> t.Optional[Country]: log.debug("Named found directly in cache") return country + if submatch := self.substring_match(normal_name, self.map): + log.debug("Found a substring match") + return submatch + log.debug("Name does not exist in cache, trying to find closest match") try: match = difflib.get_close_matches(normal_name, possibilities=self.map, n=1, cutoff=0.75)[0]