Improve search response if no results found

This commit is contained in:
Tulir Asokan
2018-02-11 17:31:34 +02:00
parent 04714a2975
commit 33d39166c4
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -235,6 +235,12 @@ class CommandHandler:
results, remote = await evt.sender.search(query, force_remote)
if not results:
if len(query) < 5 and remote:
return await evt.reply("No local results. "
"Minimum length of remote query is 5 characters.")
return await evt.reply("No results 3:")
reply = []
if remote:
reply += ["**Results from Telegram server:**", ""]