Skip to content

Commit

Permalink
Put a clause in for search term not found.
Browse files Browse the repository at this point in the history
  • Loading branch information
onewheelskyward committed Dec 30, 2018
1 parent 198601c commit 4e35b24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/lita/handlers/onewheel_filmplot.rb
Expand Up @@ -41,6 +41,11 @@ def get_plot(response)
Lita.logger.debug("Getting #{get_url}")
end

unless get_url
response.reply "#{title} not found, did you try typing it in as it was at the theatres? e.g. 'Blade Runner'"
return
end

begin
r = RestClient.get(get_url)
noko_doc = Nokogiri::HTML(r)
Expand Down
2 changes: 1 addition & 1 deletion lita-onewheel-filmplot.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |spec|
spec.name = 'lita-onewheel-filmplot'
spec.version = '0.1.0'
spec.version = '0.1.1'
spec.authors = ['Andrew Kreps']
spec.email = ['andrew.kreps@gmail.com']
spec.description = 'Film plot retrieval bot.'
Expand Down

0 comments on commit 4e35b24

Please sign in to comment.