From 339a7229271fb2fd9e2ec67722d82700a66faefd Mon Sep 17 00:00:00 2001 From: Victor Date: Wed, 11 Nov 2015 21:11:37 +0200 Subject: [PATCH] =?UTF-8?q?=D0=90=D0=BB=D0=B8=D0=B0=D1=81=20"=D0=9F=D0=B8?= =?UTF-8?q?=D0=BA=D1=87=D0=B0"=20=D0=B4=D0=BB=D1=8F=20=D0=B3=D1=83=D0=B3?= =?UTF-8?q?=D0=BB=D0=BE=D1=84=D0=BE=D1=82=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/holdfast/samobot/commands/GooglePhotoSearch.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/holdfast/samobot/commands/GooglePhotoSearch.java b/src/holdfast/samobot/commands/GooglePhotoSearch.java index 013bd5f..4cb8b66 100644 --- a/src/holdfast/samobot/commands/GooglePhotoSearch.java +++ b/src/holdfast/samobot/commands/GooglePhotoSearch.java @@ -17,7 +17,7 @@ public class GooglePhotoSearch extends Command { @Override protected String[] command() { - return new String[] { "фото", "покажи" }; + return new String[] { "фото", "покажи", "пикча" }; } @Override @@ -25,7 +25,11 @@ public class GooglePhotoSearch extends Command { final String query = message.substring(words[0].length()); String json = IOUtil.get(API_URL + URLEncoder.encode(query, "UTF-8")); - String photoUrl = new JSONObject(json).getJSONObject("responseData").getJSONArray("results").getJSONObject(Util.random(8)).getString("url"); + String photoUrl = new JSONObject(json) + .getJSONObject("responseData") + .getJSONArray("results") + .getJSONObject(Util.random(8)) + .getString("url"); String photo; try {