Fixed a few copy-paste mistakes in toString() methods & fixed functionality of GetChatMember and GetChatMemberCount
This commit is contained in:
parent
d39f874ceb
commit
e75a28f518
@ -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 {
|
||||
|
@ -109,7 +109,7 @@ public class AnswerCallbackQuery extends BotApiMethod<Boolean> {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AnswerInlineQuery{" +
|
||||
return "AnswerCallbackQuery{" +
|
||||
"callbackQueryId='" + callbackQueryId + '\'' +
|
||||
", text=" + text +
|
||||
", showAlert=" + showAlert + '\'' +
|
||||
|
@ -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";
|
||||
|
@ -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)
|
||||
|
@ -90,7 +90,7 @@ public class KickChatMember extends BotApiMethod<Boolean> {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SendMessage{" +
|
||||
return "KickChatMember{" +
|
||||
"chatId='" + chatId + '\'' +
|
||||
", userId='" + userId +
|
||||
'}';
|
||||
|
@ -86,7 +86,7 @@ public class UnbanChatMember extends BotApiMethod<Boolean> {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SendMessage{" +
|
||||
return "UnbanChatMember{" +
|
||||
"chatId='" + chatId + '\'' +
|
||||
", userId='" + userId +
|
||||
'}';
|
||||
|
@ -207,7 +207,7 @@ public class SendContact extends BotApiMethod<Message> {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SendLocation{" +
|
||||
return "SendContact{" +
|
||||
"chatId='" + chatId + '\'' +
|
||||
", phoneNumber=" + phoneNumber +
|
||||
", firstName=" + firstName +
|
||||
|
@ -233,7 +233,7 @@ public class SendVenue extends BotApiMethod<Message> {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SendLocation{" +
|
||||
return "SendVenue{" +
|
||||
"chatId='" + chatId + '\'' +
|
||||
", latitude=" + latitude +
|
||||
", longitude=" + longitude +
|
||||
|
@ -107,7 +107,7 @@ public class CallbackQuery implements IBotApiObject {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Contact{" +
|
||||
return "CallbackQuery{" +
|
||||
"id='" + id + '\'' +
|
||||
", from='" + from + '\'' +
|
||||
", message='" + message + '\'' +
|
||||
|
@ -119,7 +119,7 @@ public class MessageEntity implements IBotApiObject {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PhotoSize{" +
|
||||
return "MessageEntity{" +
|
||||
"type='" + type + '\'' +
|
||||
", offset=" + offset +
|
||||
", length=" + length +
|
||||
|
Loading…
Reference in New Issue
Block a user