Skip to content

Commit

Permalink
fixes #22, send a message if there are no papers
Browse files Browse the repository at this point in the history
  • Loading branch information
TomWagg committed Aug 24, 2022
1 parent 9d67dfa commit c348d95
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,12 @@ def reply_recent_papers(message, direct_msg=False):
" have a typo of some sort!"),
channel=message["channel"], thread_ts=thread_ts)
return
if len(papers) == 0:
app.client.chat_postMessage(text=("Sorry but I couldn't find any papers for this query!"
":gerald-search::gerald-confused: If you think there should be"
" some results then make sure you don't have a typo!"),
channel=message["channel"], thread_ts=thread_ts)
return

# if it is just one paper then give lots of details
if n_papers == 1:
Expand Down

0 comments on commit c348d95

Please sign in to comment.