diff options
| author | 2020-02-05 04:01:41 +0700 | |
|---|---|---|
| committer | 2020-02-05 04:01:41 +0700 | |
| commit | a6341b13cb3b3fc3ea95942a51478e875205abc6 (patch) | |
| tree | f92dfb02d7b87965c2cc53ec9df1e871e369faf3 | |
| parent | Removed non-alphabets from both search and tag_name when scoring. (diff) | |
Increased default thresholds from just [100, 80] to [100, 90, 80, 70, 60]
- Since it is returning as soon as there are suggestions found for a threshold, this will give a better reflection of what the bot thinks user is searching for.
| -rw-r--r-- | bot/cogs/tags.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/cogs/tags.py b/bot/cogs/tags.py index 0e8cf0278..8122f739e 100644 --- a/bot/cogs/tags.py +++ b/bot/cogs/tags.py @@ -62,7 +62,7 @@ class Tags(Cog): for tag_title, tag in self._cache.items() } - thresholds = thresholds or [100, 80] + thresholds = thresholds or [100, 90, 80, 70, 60] for threshold in thresholds: suggestions = [ @@ -80,7 +80,7 @@ class Tags(Cog): await self._get_tags() found = [self._cache.get(tag_name.lower(), None)] if not found[0]: - return self._get_suggestions(tag_name, thresholds=[100, 80]) + return self._get_suggestions(tag_name) return found @group(name='tags', aliases=('tag', 't'), invoke_without_command=True) |