Better error in !imdb
This commit is contained in:
		@@ -18,7 +18,8 @@ namespace NadekoBot.Modules.Searches.Commands.OMDB
 | 
				
			|||||||
            {
 | 
					            {
 | 
				
			||||||
                var res = await http.GetStringAsync(String.Format(queryUrl,name.Trim().Replace(' ','+'))).ConfigureAwait(false);
 | 
					                var res = await http.GetStringAsync(String.Format(queryUrl,name.Trim().Replace(' ','+'))).ConfigureAwait(false);
 | 
				
			||||||
                var movie = JsonConvert.DeserializeObject<OmdbMovie>(res);
 | 
					                var movie = JsonConvert.DeserializeObject<OmdbMovie>(res);
 | 
				
			||||||
 | 
					                if (movie?.Title == null)
 | 
				
			||||||
 | 
					                    return null;
 | 
				
			||||||
                movie.Poster = await NadekoBot.Google.ShortenUrl(movie.Poster);
 | 
					                movie.Poster = await NadekoBot.Google.ShortenUrl(movie.Poster);
 | 
				
			||||||
                return movie;
 | 
					                return movie;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user