Fixed a few copy-paste mistakes in toString() methods & fixed functionality of GetChatMember and GetChatMemberCount

This commit is contained in:
Sheigutn 2016-07-13 10:04:44 +02:00
parent d39f874ceb
commit e75a28f518
10 changed files with 9 additions and 10 deletions

View File

@ -105,7 +105,6 @@ public class TelegramBotsApi {
* @param webHookURL
* @param botToken
* @param publicCertificatePath
* @param publicCertificateName
* @throws TelegramApiException
*/
private static void setWebhook(String webHookURL, String botToken, String publicCertificatePath) throws TelegramApiException {

View File

@ -109,7 +109,7 @@ public class AnswerCallbackQuery extends BotApiMethod<Boolean> {
@Override
public String toString() {
return "AnswerInlineQuery{" +
return "AnswerCallbackQuery{" +
"callbackQueryId='" + callbackQueryId + '\'' +
", text=" + text +
", showAlert=" + showAlert + '\'' +

View File

@ -19,7 +19,7 @@ import java.io.IOException;
* @date 20 of May of 2016
*/
public class GetChatMember extends BotApiMethod<ChatMember> {
public static final String PATH = "getChatAdministrators";
public static final String PATH = "getChatMember";
private static final String CHATID_FIELD = "chat_id";
private static final String USERID_FIELD = "user_id";

View File

@ -17,7 +17,7 @@ import java.io.IOException;
* @date 20 of May of 2016
*/
public class GetChatMemberCount extends BotApiMethod<Integer> {
public static final String PATH = "getChatAdministrators";
public static final String PATH = "getChatMembersCount";
private static final String CHATID_FIELD = "chat_id";
private String chatId; ///< Unique identifier for the chat to send the message to (Or username for channels)

View File

@ -90,7 +90,7 @@ public class KickChatMember extends BotApiMethod<Boolean> {
@Override
public String toString() {
return "SendMessage{" +
return "KickChatMember{" +
"chatId='" + chatId + '\'' +
", userId='" + userId +
'}';

View File

@ -86,7 +86,7 @@ public class UnbanChatMember extends BotApiMethod<Boolean> {
@Override
public String toString() {
return "SendMessage{" +
return "UnbanChatMember{" +
"chatId='" + chatId + '\'' +
", userId='" + userId +
'}';

View File

@ -207,7 +207,7 @@ public class SendContact extends BotApiMethod<Message> {
@Override
public String toString() {
return "SendLocation{" +
return "SendContact{" +
"chatId='" + chatId + '\'' +
", phoneNumber=" + phoneNumber +
", firstName=" + firstName +

View File

@ -233,7 +233,7 @@ public class SendVenue extends BotApiMethod<Message> {
@Override
public String toString() {
return "SendLocation{" +
return "SendVenue{" +
"chatId='" + chatId + '\'' +
", latitude=" + latitude +
", longitude=" + longitude +

View File

@ -107,7 +107,7 @@ public class CallbackQuery implements IBotApiObject {
@Override
public String toString() {
return "Contact{" +
return "CallbackQuery{" +
"id='" + id + '\'' +
", from='" + from + '\'' +
", message='" + message + '\'' +

View File

@ -119,7 +119,7 @@ public class MessageEntity implements IBotApiObject {
@Override
public String toString() {
return "PhotoSize{" +
return "MessageEntity{" +
"type='" + type + '\'' +
", offset=" + offset +
", length=" + length +