diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 434b83aa..89d6b111 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -24,9 +24,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 3bb9901e..f46d96ae 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -50,6 +50,9 @@
+
+
+
/usr/local/bin/bower
diff --git a/TelegramBots.iml b/TelegramBots.iml
index efbc891b..292848d5 100644
--- a/TelegramBots.iml
+++ b/TelegramBots.iml
@@ -9,7 +9,7 @@
-
+
diff --git a/pom.xml b/pom.xml
index 432d99e6..66d69447 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
jar
org.telegram
telegrambots
- 1.0
+ 1.1
Telegram Bots
Easy to use library to create Telegram Bots
diff --git a/src/main/java/org/telegram/telegrambots/TelegramBotsApi.java b/src/main/java/org/telegram/telegrambots/TelegramBotsApi.java
index e0aeef53..f9569ec4 100644
--- a/src/main/java/org/telegram/telegrambots/TelegramBotsApi.java
+++ b/src/main/java/org/telegram/telegrambots/TelegramBotsApi.java
@@ -1,6 +1,8 @@
package org.telegram.telegrambots;
import org.apache.http.HttpEntity;
+import org.apache.http.HttpHost;
+import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.conn.ssl.NoopHostnameVerifier;
diff --git a/src/main/java/org/telegram/telegrambots/api/methods/AnswerInlineQuery.java b/src/main/java/org/telegram/telegrambots/api/methods/AnswerInlineQuery.java
index 37ec2757..8d37d3f5 100644
--- a/src/main/java/org/telegram/telegrambots/api/methods/AnswerInlineQuery.java
+++ b/src/main/java/org/telegram/telegrambots/api/methods/AnswerInlineQuery.java
@@ -135,4 +135,15 @@ public class AnswerInlineQuery extends BotApiMethod {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "AnswerInlineQuery{" +
+ "inlineQueryId='" + inlineQueryId + '\'' +
+ ", results=" + results +
+ ", cacheTime=" + cacheTime +
+ ", isPersonal=" + isPersonal +
+ ", nextOffset='" + nextOffset + '\'' +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/methods/ForwardMessage.java b/src/main/java/org/telegram/telegrambots/api/methods/ForwardMessage.java
index 24e8b67f..bda92cf1 100644
--- a/src/main/java/org/telegram/telegrambots/api/methods/ForwardMessage.java
+++ b/src/main/java/org/telegram/telegrambots/api/methods/ForwardMessage.java
@@ -89,4 +89,13 @@ public class ForwardMessage extends BotApiMethod {
}
return null;
}
+
+ @Override
+ public String toString() {
+ return "ForwardMessage{" +
+ "chatId='" + chatId + '\'' +
+ ", fromChatId=" + fromChatId +
+ ", messageId=" + messageId +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/methods/GetFile.java b/src/main/java/org/telegram/telegrambots/api/methods/GetFile.java
index db81a712..ddcf3acf 100644
--- a/src/main/java/org/telegram/telegrambots/api/methods/GetFile.java
+++ b/src/main/java/org/telegram/telegrambots/api/methods/GetFile.java
@@ -71,4 +71,11 @@ public class GetFile extends BotApiMethod {
}
return null;
}
+
+ @Override
+ public String toString() {
+ return "GetFile{" +
+ "fileId='" + fileId + '\'' +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/methods/GetMe.java b/src/main/java/org/telegram/telegrambots/api/methods/GetMe.java
index 46ec62bd..a9f025b1 100644
--- a/src/main/java/org/telegram/telegrambots/api/methods/GetMe.java
+++ b/src/main/java/org/telegram/telegrambots/api/methods/GetMe.java
@@ -47,4 +47,6 @@ public class GetMe extends BotApiMethod {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+
}
diff --git a/src/main/java/org/telegram/telegrambots/api/methods/GetUpdates.java b/src/main/java/org/telegram/telegrambots/api/methods/GetUpdates.java
index 80908460..69def6b0 100644
--- a/src/main/java/org/telegram/telegrambots/api/methods/GetUpdates.java
+++ b/src/main/java/org/telegram/telegrambots/api/methods/GetUpdates.java
@@ -74,4 +74,13 @@ public class GetUpdates implements IToJson {
}
return jsonObject;
}
+
+ @Override
+ public String toString() {
+ return "GetUpdates{" +
+ "offset=" + offset +
+ ", limit=" + limit +
+ ", timeout=" + timeout +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/methods/GetUserProfilePhotos.java b/src/main/java/org/telegram/telegrambots/api/methods/GetUserProfilePhotos.java
index d29828ee..45490c74 100644
--- a/src/main/java/org/telegram/telegrambots/api/methods/GetUserProfilePhotos.java
+++ b/src/main/java/org/telegram/telegrambots/api/methods/GetUserProfilePhotos.java
@@ -99,4 +99,13 @@ public class GetUserProfilePhotos extends BotApiMethod {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "GetUserProfilePhotos{" +
+ "userId=" + userId +
+ ", offset=" + offset +
+ ", limit=" + limit +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/methods/SendAudio.java b/src/main/java/org/telegram/telegrambots/api/methods/SendAudio.java
index 93eb237e..22038823 100644
--- a/src/main/java/org/telegram/telegrambots/api/methods/SendAudio.java
+++ b/src/main/java/org/telegram/telegrambots/api/methods/SendAudio.java
@@ -101,4 +101,18 @@ public class SendAudio {
public String getAudioName() {
return audioName;
}
+
+ @Override
+ public String toString() {
+ return "SendAudio{" +
+ "chatId='" + chatId + '\'' +
+ ", audio='" + audio + '\'' +
+ ", replayToMessageId=" + replayToMessageId +
+ ", replayMarkup=" + replayMarkup +
+ ", performer='" + performer + '\'' +
+ ", title='" + title + '\'' +
+ ", isNewAudio=" + isNewAudio +
+ ", audioName='" + audioName + '\'' +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/methods/SendChatAction.java b/src/main/java/org/telegram/telegrambots/api/methods/SendChatAction.java
index 98f63500..ac168d81 100644
--- a/src/main/java/org/telegram/telegrambots/api/methods/SendChatAction.java
+++ b/src/main/java/org/telegram/telegrambots/api/methods/SendChatAction.java
@@ -83,4 +83,12 @@ public class SendChatAction extends BotApiMethod{
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "SendChatAction{" +
+ "chatId='" + chatId + '\'' +
+ ", action='" + action + '\'' +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/methods/SendDocument.java b/src/main/java/org/telegram/telegrambots/api/methods/SendDocument.java
index 32a7a7a8..723185fa 100644
--- a/src/main/java/org/telegram/telegrambots/api/methods/SendDocument.java
+++ b/src/main/java/org/telegram/telegrambots/api/methods/SendDocument.java
@@ -73,4 +73,16 @@ public class SendDocument {
public void setReplayMarkup(ReplyKeyboard replayMarkup) {
this.replayMarkup = replayMarkup;
}
+
+ @Override
+ public String toString() {
+ return "SendDocument{" +
+ "chatId='" + chatId + '\'' +
+ ", document='" + document + '\'' +
+ ", replayToMessageId=" + replayToMessageId +
+ ", replayMarkup=" + replayMarkup +
+ ", isNewDocument=" + isNewDocument +
+ ", documentName='" + documentName + '\'' +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/methods/SendLocation.java b/src/main/java/org/telegram/telegrambots/api/methods/SendLocation.java
index d2ecd057..8fba16d8 100644
--- a/src/main/java/org/telegram/telegrambots/api/methods/SendLocation.java
+++ b/src/main/java/org/telegram/telegrambots/api/methods/SendLocation.java
@@ -120,4 +120,15 @@ public class SendLocation extends BotApiMethod {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "SendLocation{" +
+ "chatId='" + chatId + '\'' +
+ ", latitude=" + latitude +
+ ", longitude=" + longitude +
+ ", replayToMessageId=" + replayToMessageId +
+ ", replayMarkup=" + replayMarkup +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/methods/SendMessage.java b/src/main/java/org/telegram/telegrambots/api/methods/SendMessage.java
index 74261cea..a16cbe71 100644
--- a/src/main/java/org/telegram/telegrambots/api/methods/SendMessage.java
+++ b/src/main/java/org/telegram/telegrambots/api/methods/SendMessage.java
@@ -153,4 +153,16 @@ public class SendMessage extends BotApiMethod {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "SendMessage{" +
+ "chatId='" + chatId + '\'' +
+ ", text='" + text + '\'' +
+ ", parseMode='" + parseMode + '\'' +
+ ", disableWebPagePreview=" + disableWebPagePreview +
+ ", replayToMessageId=" + replayToMessageId +
+ ", replayMarkup=" + replayMarkup +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/methods/SendPhoto.java b/src/main/java/org/telegram/telegrambots/api/methods/SendPhoto.java
index 8e2388f4..2983d2d5 100644
--- a/src/main/java/org/telegram/telegrambots/api/methods/SendPhoto.java
+++ b/src/main/java/org/telegram/telegrambots/api/methods/SendPhoto.java
@@ -84,4 +84,17 @@ public class SendPhoto {
this.isNewPhoto = true;
this.photoName = photoName;
}
+
+ @Override
+ public String toString() {
+ return "SendPhoto{" +
+ "chatId='" + chatId + '\'' +
+ ", photo='" + photo + '\'' +
+ ", caption='" + caption + '\'' +
+ ", replayToMessageId=" + replayToMessageId +
+ ", replayMarkup=" + replayMarkup +
+ ", isNewPhoto=" + isNewPhoto +
+ ", photoName='" + photoName + '\'' +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/methods/SendSticker.java b/src/main/java/org/telegram/telegrambots/api/methods/SendSticker.java
index 987eeca1..fe24a616 100644
--- a/src/main/java/org/telegram/telegrambots/api/methods/SendSticker.java
+++ b/src/main/java/org/telegram/telegrambots/api/methods/SendSticker.java
@@ -73,4 +73,16 @@ public class SendSticker {
public String getStickerName() {
return stickerName;
}
+
+ @Override
+ public String toString() {
+ return "SendSticker{" +
+ "chatId='" + chatId + '\'' +
+ ", sticker='" + sticker + '\'' +
+ ", replayToMessageId=" + replayToMessageId +
+ ", replayMarkup=" + replayMarkup +
+ ", isNewSticker=" + isNewSticker +
+ ", stickerName='" + stickerName + '\'' +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/methods/SendVideo.java b/src/main/java/org/telegram/telegrambots/api/methods/SendVideo.java
index ed573603..5b629426 100644
--- a/src/main/java/org/telegram/telegrambots/api/methods/SendVideo.java
+++ b/src/main/java/org/telegram/telegrambots/api/methods/SendVideo.java
@@ -95,4 +95,18 @@ public class SendVideo {
this.isNewVideo = true;
this.videoName = videoName;
}
+
+ @Override
+ public String toString() {
+ return "SendVideo{" +
+ "chatId='" + chatId + '\'' +
+ ", video='" + video + '\'' +
+ ", duration=" + duration +
+ ", caption='" + caption + '\'' +
+ ", replayToMessageId=" + replayToMessageId +
+ ", replayMarkup=" + replayMarkup +
+ ", isNewVideo=" + isNewVideo +
+ ", videoName='" + videoName + '\'' +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/methods/SendVoice.java b/src/main/java/org/telegram/telegrambots/api/methods/SendVoice.java
index 2dfca578..c8d0aafc 100644
--- a/src/main/java/org/telegram/telegrambots/api/methods/SendVoice.java
+++ b/src/main/java/org/telegram/telegrambots/api/methods/SendVoice.java
@@ -28,4 +28,15 @@ public class SendVoice {
public SendVoice() {
super();
}
+
+ @Override
+ public String toString() {
+ return "SendVoice{" +
+ "chatId='" + chatId + '\'' +
+ ", audio='" + audio + '\'' +
+ ", replayToMessageId=" + replayToMessageId +
+ ", replayMarkup=" + replayMarkup +
+ ", duration=" + duration +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/methods/SetWebhook.java b/src/main/java/org/telegram/telegrambots/api/methods/SetWebhook.java
index 5cba2975..46f05549 100644
--- a/src/main/java/org/telegram/telegrambots/api/methods/SetWebhook.java
+++ b/src/main/java/org/telegram/telegrambots/api/methods/SetWebhook.java
@@ -36,4 +36,12 @@ public class SetWebhook {
public void setCertificateFile(String certificateFile) {
this.certificateFile = certificateFile;
}
+
+ @Override
+ public String toString() {
+ return "SetWebhook{" +
+ "url='" + url + '\'' +
+ ", certificateFile='" + certificateFile + '\'' +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/Audio.java b/src/main/java/org/telegram/telegrambots/api/objects/Audio.java
index a21adaed..bdafd217 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/Audio.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/Audio.java
@@ -131,4 +131,16 @@ public class Audio implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "Audio{" +
+ "fileId='" + fileId + '\'' +
+ ", duration=" + duration +
+ ", mimeType='" + mimeType + '\'' +
+ ", fileSize=" + fileSize +
+ ", title='" + title + '\'' +
+ ", performer='" + performer + '\'' +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/Chat.java b/src/main/java/org/telegram/telegrambots/api/objects/Chat.java
index dbf68921..6776b0b2 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/Chat.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/Chat.java
@@ -126,4 +126,16 @@ public class Chat implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "Chat{" +
+ "id=" + id +
+ ", type='" + type + '\'' +
+ ", title='" + title + '\'' +
+ ", firstName='" + firstName + '\'' +
+ ", lastName='" + lastName + '\'' +
+ ", userName='" + userName + '\'' +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/ChosenInlineQuery.java b/src/main/java/org/telegram/telegrambots/api/objects/ChosenInlineQuery.java
index aecca51a..8ea998e9 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/ChosenInlineQuery.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/ChosenInlineQuery.java
@@ -63,4 +63,13 @@ public class ChosenInlineQuery implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "ChosenInlineQuery{" +
+ "resultId='" + resultId + '\'' +
+ ", from=" + from +
+ ", query='" + query + '\'' +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/Contact.java b/src/main/java/org/telegram/telegrambots/api/objects/Contact.java
index 7fc381a6..1636be34 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/Contact.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/Contact.java
@@ -65,4 +65,14 @@ public class Contact implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "Contact{" +
+ "phoneNumber='" + phoneNumber + '\'' +
+ ", firstName='" + firstName + '\'' +
+ ", lastName='" + lastName + '\'' +
+ ", userID=" + userID +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/Document.java b/src/main/java/org/telegram/telegrambots/api/objects/Document.java
index b562fd4d..78a21b33 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/Document.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/Document.java
@@ -116,4 +116,15 @@ public class Document implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "Document{" +
+ "fileId='" + fileId + '\'' +
+ ", thumb=" + thumb +
+ ", fileName='" + fileName + '\'' +
+ ", mimeType='" + mimeType + '\'' +
+ ", fileSize=" + fileSize +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/File.java b/src/main/java/org/telegram/telegrambots/api/objects/File.java
index 367f71f4..9176b143 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/File.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/File.java
@@ -83,4 +83,13 @@ public class File implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "File{" +
+ "fileId='" + fileId + '\'' +
+ ", fileSize=" + fileSize +
+ ", filePath='" + filePath + '\'' +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/ForceReplyKeyboard.java b/src/main/java/org/telegram/telegrambots/api/objects/ForceReplyKeyboard.java
index ced0d9c5..18149d9a 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/ForceReplyKeyboard.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/ForceReplyKeyboard.java
@@ -91,4 +91,12 @@ public class ForceReplyKeyboard implements ReplyKeyboard {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "ForceReplyKeyboard{" +
+ "forceReply=" + forceReply +
+ ", selective=" + selective +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/InlineQuery.java b/src/main/java/org/telegram/telegrambots/api/objects/InlineQuery.java
index b0d44a69..afd5a693 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/InlineQuery.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/InlineQuery.java
@@ -73,4 +73,15 @@ public class InlineQuery implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "InlineQuery{" +
+ "id='" + id + '\'' +
+ ", from=" + from +
+ ", query='" + query + '\'' +
+ ", offset='" + offset + '\'' +
+ '}';
+ }
}
+
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultArticle.java b/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultArticle.java
index e3ec0503..efdd61bf 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultArticle.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultArticle.java
@@ -238,4 +238,22 @@ public class InlineQueryResultArticle implements InlineQueryResult {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "InlineQueryResultArticle{" +
+ "type='" + type + '\'' +
+ ", id='" + id + '\'' +
+ ", title='" + title + '\'' +
+ ", messageText='" + messageText + '\'' +
+ ", parseMode='" + parseMode + '\'' +
+ ", disableWebPagePreview=" + disableWebPagePreview +
+ ", url='" + url + '\'' +
+ ", hideUrl=" + hideUrl +
+ ", description='" + description + '\'' +
+ ", thumbUrl='" + thumbUrl + '\'' +
+ ", thumbWidth=" + thumbWidth +
+ ", thumbHeight=" + thumbHeight +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultGif.java b/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultGif.java
index 168ae778..3e8b7849 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultGif.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultGif.java
@@ -222,4 +222,21 @@ public class InlineQueryResultGif implements InlineQueryResult {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "InlineQueryResultGif{" +
+ "type='" + type + '\'' +
+ ", id='" + id + '\'' +
+ ", gifUrl='" + gifUrl + '\'' +
+ ", gifWidth=" + gifWidth +
+ ", gifHeight=" + gifHeight +
+ ", thumbUrl='" + thumbUrl + '\'' +
+ ", title='" + title + '\'' +
+ ", caption='" + caption + '\'' +
+ ", messageText='" + messageText + '\'' +
+ ", parseMode='" + parseMode + '\'' +
+ ", disableWebPagePreview=" + disableWebPagePreview +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultMpeg4Gif.java b/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultMpeg4Gif.java
index f7fd2f36..5edd936d 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultMpeg4Gif.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultMpeg4Gif.java
@@ -223,4 +223,21 @@ public class InlineQueryResultMpeg4Gif implements InlineQueryResult {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "InlineQueryResultMpeg4Gif{" +
+ "type='" + type + '\'' +
+ ", id='" + id + '\'' +
+ ", mpeg4Url='" + mpeg4Url + '\'' +
+ ", mpeg4Width=" + mpeg4Width +
+ ", mpeg4Height=" + mpeg4Height +
+ ", thumbUrl='" + thumbUrl + '\'' +
+ ", title='" + title + '\'' +
+ ", caption='" + caption + '\'' +
+ ", messageText='" + messageText + '\'' +
+ ", parseMode='" + parseMode + '\'' +
+ ", disableWebPagePreview=" + disableWebPagePreview +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultPhoto.java b/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultPhoto.java
index 835dfd7c..4c9b7418 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultPhoto.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultPhoto.java
@@ -258,4 +258,23 @@ public class InlineQueryResultPhoto implements InlineQueryResult {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "InlineQueryResultPhoto{" +
+ "type='" + type + '\'' +
+ ", id='" + id + '\'' +
+ ", photoUrl='" + photoUrl + '\'' +
+ ", mimeType='" + mimeType + '\'' +
+ ", photoWidth=" + photoWidth +
+ ", photoHeight=" + photoHeight +
+ ", thumbUrl='" + thumbUrl + '\'' +
+ ", title='" + title + '\'' +
+ ", description='" + description + '\'' +
+ ", caption='" + caption + '\'' +
+ ", messageText='" + messageText + '\'' +
+ ", parseMode='" + parseMode + '\'' +
+ ", disableWebPagePreview=" + disableWebPagePreview +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultVideo.java b/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultVideo.java
index 28cc7461..7da6f79c 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultVideo.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/InlineQueryResultVideo.java
@@ -254,4 +254,23 @@ public class InlineQueryResultVideo implements InlineQueryResult {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "InlineQueryResultVideo{" +
+ "type='" + type + '\'' +
+ ", id='" + id + '\'' +
+ ", mimeType='" + mimeType + '\'' +
+ ", videoUrl='" + videoUrl + '\'' +
+ ", videoWidth=" + videoWidth +
+ ", videoHeight=" + videoHeight +
+ ", videoDuration=" + videoDuration +
+ ", thumbUrl='" + thumbUrl + '\'' +
+ ", title='" + title + '\'' +
+ ", description='" + description + '\'' +
+ ", messageText='" + messageText + '\'' +
+ ", parseMode='" + parseMode + '\'' +
+ ", disableWebPagePreview=" + disableWebPagePreview +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/Location.java b/src/main/java/org/telegram/telegrambots/api/objects/Location.java
index 14d1b3b1..c59f963d 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/Location.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/Location.java
@@ -63,4 +63,12 @@ public class Location implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "Location{" +
+ "longitude=" + longitude +
+ ", latitude=" + latitude +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/Message.java b/src/main/java/org/telegram/telegrambots/api/objects/Message.java
index 8fa6f5d8..443bcabf 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/Message.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/Message.java
@@ -525,4 +525,36 @@ public class Message implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "Message{" +
+ "messageId=" + messageId +
+ ", from=" + from +
+ ", date=" + date +
+ ", chat=" + chat +
+ ", forwardFrom=" + forwardFrom +
+ ", forwardDate=" + forwardDate +
+ ", text='" + text + '\'' +
+ ", audio=" + audio +
+ ", document=" + document +
+ ", photo=" + photo +
+ ", sticker=" + sticker +
+ ", video=" + video +
+ ", contact=" + contact +
+ ", location=" + location +
+ ", newChatParticipant=" + newChatParticipant +
+ ", leftChatParticipant=" + leftChatParticipant +
+ ", newChatTitle='" + newChatTitle + '\'' +
+ ", newChatPhoto=" + newChatPhoto +
+ ", deleteChatPhoto=" + deleteChatPhoto +
+ ", groupchatCreated=" + groupchatCreated +
+ ", replyToMessage=" + replyToMessage +
+ ", voice=" + voice +
+ ", superGroupCreated=" + superGroupCreated +
+ ", channelChatCreated=" + channelChatCreated +
+ ", migrateToChatId=" + migrateToChatId +
+ ", migrateFromChatId=" + migrateFromChatId +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/PhotoSize.java b/src/main/java/org/telegram/telegrambots/api/objects/PhotoSize.java
index b7869434..5f2be519 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/PhotoSize.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/PhotoSize.java
@@ -93,4 +93,14 @@ public class PhotoSize implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "PhotoSize{" +
+ "fileId='" + fileId + '\'' +
+ ", width=" + width +
+ ", height=" + height +
+ ", fileSize=" + fileSize +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/ReplyKeyboardHide.java b/src/main/java/org/telegram/telegrambots/api/objects/ReplyKeyboardHide.java
index dd7b81c0..9b370618 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/ReplyKeyboardHide.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/ReplyKeyboardHide.java
@@ -85,4 +85,12 @@ public class ReplyKeyboardHide implements ReplyKeyboard {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "ReplyKeyboardHide{" +
+ "hideKeyboard=" + hideKeyboard +
+ ", selective=" + selective +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/ReplyKeyboardMarkup.java b/src/main/java/org/telegram/telegrambots/api/objects/ReplyKeyboardMarkup.java
index 4277d159..e268566e 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/ReplyKeyboardMarkup.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/ReplyKeyboardMarkup.java
@@ -153,4 +153,14 @@ public class ReplyKeyboardMarkup implements ReplyKeyboard {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "ReplyKeyboardMarkup{" +
+ "keyboard=" + keyboard +
+ ", resizeKeyboard=" + resizeKeyboard +
+ ", oneTimeKeyboad=" + oneTimeKeyboad +
+ ", selective=" + selective +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/Sticker.java b/src/main/java/org/telegram/telegrambots/api/objects/Sticker.java
index 0505fc95..2a76a5de 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/Sticker.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/Sticker.java
@@ -70,4 +70,15 @@ public class Sticker implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "Sticker{" +
+ "fileId='" + fileId + '\'' +
+ ", width=" + width +
+ ", height=" + height +
+ ", thumb=" + thumb +
+ ", fileSize=" + fileSize +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/Update.java b/src/main/java/org/telegram/telegrambots/api/objects/Update.java
index 3c111d14..a3992945 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/Update.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/Update.java
@@ -101,4 +101,14 @@ public class Update implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "Update{" +
+ "updateId=" + updateId +
+ ", message=" + message +
+ ", inlineQuery=" + inlineQuery +
+ ", chosenInlineQuery=" + chosenInlineQuery +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/User.java b/src/main/java/org/telegram/telegrambots/api/objects/User.java
index 6a5a3918..c7920f4d 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/User.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/User.java
@@ -81,4 +81,14 @@ public class User implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "User{" +
+ "id=" + id +
+ ", firstName='" + firstName + '\'' +
+ ", lastName='" + lastName + '\'' +
+ ", userName='" + userName + '\'' +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/UserProfilePhotos.java b/src/main/java/org/telegram/telegrambots/api/objects/UserProfilePhotos.java
index 541900aa..5d680abb 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/UserProfilePhotos.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/UserProfilePhotos.java
@@ -87,4 +87,12 @@ public class UserProfilePhotos implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "UserProfilePhotos{" +
+ "totalCount=" + totalCount +
+ ", photos=" + photos +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/Video.java b/src/main/java/org/telegram/telegrambots/api/objects/Video.java
index 34816083..0a741909 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/Video.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/Video.java
@@ -139,4 +139,17 @@ public class Video implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "Video{" +
+ "fileId='" + fileId + '\'' +
+ ", width=" + width +
+ ", height=" + height +
+ ", duration=" + duration +
+ ", thumb=" + thumb +
+ ", mimeType='" + mimeType + '\'' +
+ ", fileSize=" + fileSize +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/api/objects/Voice.java b/src/main/java/org/telegram/telegrambots/api/objects/Voice.java
index bb5af2ef..4d695356 100644
--- a/src/main/java/org/telegram/telegrambots/api/objects/Voice.java
+++ b/src/main/java/org/telegram/telegrambots/api/objects/Voice.java
@@ -96,4 +96,14 @@ public class Voice implements IBotApiObject {
public void serializeWithType(JsonGenerator gen, SerializerProvider serializers, TypeSerializer typeSer) throws IOException {
serialize(gen, serializers);
}
+
+ @Override
+ public String toString() {
+ return "Voice{" +
+ "fileId='" + fileId + '\'' +
+ ", duration=" + duration +
+ ", mimeType='" + mimeType + '\'' +
+ ", fileSize=" + fileSize +
+ '}';
+ }
}
diff --git a/src/main/java/org/telegram/telegrambots/bots/AbsSender.java b/src/main/java/org/telegram/telegrambots/bots/AbsSender.java
index 0779642c..b6b4c9fc 100644
--- a/src/main/java/org/telegram/telegrambots/bots/AbsSender.java
+++ b/src/main/java/org/telegram/telegrambots/bots/AbsSender.java
@@ -2,6 +2,7 @@ package org.telegram.telegrambots.bots;
import org.apache.http.HttpEntity;
import org.apache.http.NameValuePair;
+import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
@@ -185,7 +186,6 @@ public abstract class AbsSender {
CloseableHttpClient httpClient = HttpClients.createDefault();
String url = getBaseUrl() + SendDocument.PATH;
HttpPost httppost = new HttpPost(url);
-
if (sendDocument.isNewDocument()) {
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.addTextBody(SendDocument.CHATID_FIELD, sendDocument.getChatId());
@@ -233,7 +233,6 @@ public abstract class AbsSender {
CloseableHttpClient httpClient = HttpClients.createDefault();
String url = getBaseUrl() + SendPhoto.PATH;
HttpPost httppost = new HttpPost(url);
-
if (sendPhoto.isNewPhoto()) {
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.addTextBody(SendPhoto.CHATID_FIELD, sendPhoto.getChatId());
@@ -287,7 +286,6 @@ public abstract class AbsSender {
CloseableHttpClient httpClient = HttpClients.createDefault();
String url = getBaseUrl() + SendVideo.PATH;
HttpPost httppost = new HttpPost(url);
-
if (sendVideo.isNewVideo()) {
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.addTextBody(SendVideo.CHATID_FIELD, sendVideo.getChatId());
@@ -348,7 +346,6 @@ public abstract class AbsSender {
CloseableHttpClient httpClient = HttpClients.createDefault();
String url = getBaseUrl() + SendSticker.PATH;
HttpPost httppost = new HttpPost(url);
-
if (sendSticker.isNewSticker()) {
MultipartEntityBuilder builder = MultipartEntityBuilder.create();
builder.addTextBody(SendSticker.CHATID_FIELD, sendSticker.getChatId());