diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/TelegramBotsApi.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/TelegramBotsApi.java index 94a2b1c3..ae8b5185 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/TelegramBotsApi.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/TelegramBotsApi.java @@ -18,7 +18,7 @@ public class TelegramBotsApi { private static final String webhookUrlFormat = "{0}callback/"; private boolean useWebhook; ///< True to enable webhook usage private Webhook webhook; ///< Webhook instance - private String extrenalUrl; ///< External url of the bots + private String externalUrl; ///< External url of the bots private String pathToCertificate; ///< Path to public key certificate /** @@ -43,7 +43,7 @@ public class TelegramBotsApi { } this.useWebhook = true; - this.extrenalUrl = fixExternalUrl(externalUrl); + this.externalUrl = fixExternalUrl(externalUrl); webhook = ApiContext.getInstance(Webhook.class); webhook.setInternalUrl(internalUrl); webhook.startServer(); @@ -71,7 +71,7 @@ public class TelegramBotsApi { } this.useWebhook = true; - this.extrenalUrl = fixExternalUrl(externalUrl); + this.externalUrl = fixExternalUrl(externalUrl); webhook = ApiContext.getInstance(Webhook.class); webhook.setInternalUrl(internalUrl); webhook.setKeyStore(keyStore, keyStorePassword); @@ -104,7 +104,7 @@ public class TelegramBotsApi { } this.useWebhook = true; - this.extrenalUrl = fixExternalUrl(externalUrl); + this.externalUrl = fixExternalUrl(externalUrl); this.pathToCertificate = pathToCertificate; webhook = ApiContext.getInstance(Webhook.class); webhook.setInternalUrl(internalUrl); @@ -133,7 +133,7 @@ public class TelegramBotsApi { public void registerBot(WebhookBot bot) throws TelegramApiRequestException { if (useWebhook) { webhook.registerWebhook(bot); - bot.setWebhook(extrenalUrl + bot.getBotPath(), pathToCertificate); + bot.setWebhook(externalUrl + bot.getBotPath(), pathToCertificate); } } diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/AnswerCallbackQuery.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/AnswerCallbackQuery.java index fd1da785..a6783826 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/AnswerCallbackQuery.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/AnswerCallbackQuery.java @@ -35,13 +35,13 @@ public class AnswerCallbackQuery extends BotApiMethod { @JsonProperty(TEXT_FIELD) private String text; ///< Optional Text of the notification. If not specified, nothing will be shown to the user, 0-200 characters @JsonProperty(SHOWALERT_FIELD) - private Boolean showAlert; ///< Optional. If true, an alert will be shown by the client instead of a notificaiton at the top of the chat screen. Defaults to false. + private Boolean showAlert; ///< Optional. If true, an alert will be shown by the client instead of a notification at the top of the chat screen. Defaults to false. @JsonProperty(URL_FIELD) /** * Optional. URL that will be opened by the user's client. * If you have created a Game and accepted the conditions via @Botfather, * specify the URL that opens your game. Otherwise you may use links - * InlineQueryResultGamelike telegram.me/your_bot?start=XXXX that open your bot with a parameter. + * like telegram.me/your_bot?start=XXXX that open your bot with a parameter. */ private String url; @JsonProperty(CACHETIME_FIELD) diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/games/SetGameScore.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/games/SetGameScore.java index 115da1ac..79f431d4 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/games/SetGameScore.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/games/SetGameScore.java @@ -63,7 +63,7 @@ public class SetGameScore extends BotApiMethod { @JsonProperty(SCORE_FIELD) private Integer score; ///< New score, must be positive @JsonProperty(FORCE_FIELD) - private Boolean force; ///< Opfional. Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters + private Boolean force; ///< Optional. Pass True, if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters public SetGameScore() { super(); diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/send/SendAnimation.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/send/SendAnimation.java index d5a7fb37..f4d971aa 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/send/SendAnimation.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/send/SendAnimation.java @@ -46,9 +46,9 @@ public class SendAnimation extends PartialBotApiMethod { */ private InputFile animation; private Integer duration; ///< Optional. Duration of sent animation in seconds - private String caption; ///< OptionaL. Animation caption (may also be used when resending videos by file_id). + private String caption; ///< Optional. Animation caption (may also be used when resending videos by file_id). private Integer width; ///< Optional. Animation width - private Integer height; ///< OptionaL. Animation height + private Integer height; ///< Optional. Animation height private Boolean disableNotification; ///< Optional. Sends the message silently. Users will receive a notification with no sound. private Integer replyToMessageId; ///< Optional. If the message is a reply, ID of the original message private ReplyKeyboard replyMarkup; ///< Optional. JSON-serialized object for a custom reply keyboard diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/send/SendVideo.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/send/SendVideo.java index d37ce3f8..5c5bd310 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/send/SendVideo.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/send/SendVideo.java @@ -39,9 +39,9 @@ public class SendVideo extends PartialBotApiMethod { private String chatId; ///< Unique identifier for the chat to send the message to (Or username for channels) private InputFile video; ///< Video to send. file_id as String to resend a video that is already on the Telegram servers or URL to upload it private Integer duration; ///< Optional. Duration of sent video in seconds - private String caption; ///< OptionaL. Video caption (may also be used when resending videos by file_id). + private String caption; ///< Optional. Video caption (may also be used when resending videos by file_id). private Integer width; ///< Optional. Video width - private Integer height; ///< OptionaL. Video height + private Integer height; ///< Optional. Video height private Boolean supportsStreaming; ///< Optional. Pass True, if the uploaded video is suitable for streaming private Boolean disableNotification; ///< Optional. Sends the message silently. Users will receive a notification with no sound. private Integer replyToMessageId; ///< Optional. If the message is a reply, ID of the original message diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/stickers/CreateNewStickerSet.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/stickers/CreateNewStickerSet.java index ec6e2311..b3046a70 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/stickers/CreateNewStickerSet.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/stickers/CreateNewStickerSet.java @@ -164,7 +164,7 @@ public class CreateNewStickerSet extends PartialBotApiMethod { throw new TelegramApiValidationException("name can't be empty", this); } if (title == null || title.isEmpty()) { - throw new TelegramApiValidationException("userId can't be empty", this); + throw new TelegramApiValidationException("title can't be empty", this); } if (emojis == null || emojis.isEmpty()) { throw new TelegramApiValidationException("emojis can't be empty", this); diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/updatingmessages/EditMessageMedia.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/updatingmessages/EditMessageMedia.java index 3cc7a200..20118738 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/updatingmessages/EditMessageMedia.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/methods/updatingmessages/EditMessageMedia.java @@ -153,7 +153,7 @@ public class EditMessageMedia extends PartialBotApiMethod { } } if (media == null) { - throw new TelegramApiValidationException("Text parameter can't be empty", this); + throw new TelegramApiValidationException("Media parameter can't be empty", this); } media.validate(); diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/Chat.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/Chat.java index 14427628..24ac9d1e 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/Chat.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/Chat.java @@ -38,7 +38,7 @@ public class Chat implements BotApiObject { * so a signed 64 bit integer or double-precision float type are safe for storing this identifier. */ @JsonProperty(ID_FIELD) - private Long id; ///< Unique identifier for this chat, not exciding 1e13 by absolute value + private Long id; ///< Unique identifier for this chat, not exceeding 1e13 by absolute value @JsonProperty(TYPE_FIELD) private String type; ///< Type of the chat, one of “private”, “group” or “channel” @JsonProperty(TITLE_FIELD) diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/ChatMember.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/ChatMember.java index c22f29d0..59b42f03 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/ChatMember.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/ChatMember.java @@ -33,7 +33,7 @@ public class ChatMember implements BotApiObject { @JsonProperty(STATUS_FIELD) private String status; ///< The member's status in the chat. Can be “creator”, “administrator”, “member”, “restricted”, “left” or “kicked” @JsonProperty(UNTILDATE_FIELD) - private Integer untilDate; ///< Optional. Resticted and kicked only. Date when restrictions will be lifted for this user, unix time + private Integer untilDate; ///< Optional. Restricted and kicked only. Date when restrictions will be lifted for this user, unix time @JsonProperty(CANBEEDITED_FIELD) private Boolean canBeEdited; ///< Optional. Administrators only. True, if the bot is allowed to edit administrator privileges of that user @JsonProperty(CANCHANGEINFORMATION_FIELD) @@ -51,7 +51,7 @@ public class ChatMember implements BotApiObject { @JsonProperty(CANPINMESSAGES_FIELD) private Boolean canPinMessages; ///< Optional. Administrators only. True, if the administrator can pin messages @JsonProperty(CANPROMOTEMEMBERS_FIELD) - private Boolean canPromoteMembers; ///< Optional. Administrators only. True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that it has promoted, directly or indirectly (promoted by administators that were appointed by the bot) + private Boolean canPromoteMembers; ///< Optional. Administrators only. True, if the administrator can add new administrators with a subset of his own privileges or demote administrators that it has promoted, directly or indirectly (promoted by administrators that were appointed by the bot) @JsonProperty(CANSENDMESSAGES_FIELD) private Boolean canSendMessages; ///< Optional. Restricted only. True, if the user can send text messages, contacts, locations and venues @JsonProperty(CANSENDMEDIAMESSAGES_FIELD) diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/PhotoSize.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/PhotoSize.java index 81b143a4..bdf8cbec 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/PhotoSize.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/PhotoSize.java @@ -27,7 +27,7 @@ public class PhotoSize implements BotApiObject { @JsonProperty(FILESIZE_FIELD) private Integer fileSize; ///< Optional. File size @JsonProperty(FILEPATH_FIELD) - private String filePath; ///< Undocumented field. Optional. Can contain the path to download the file direclty without calling to getFile + private String filePath; ///< Undocumented field. Optional. Can contain the path to download the file directly without calling to getFile public PhotoSize() { super(); diff --git a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/inlinequery/result/InlineQueryResultVenue.java b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/inlinequery/result/InlineQueryResultVenue.java index 0da6e048..c24da2aa 100644 --- a/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/inlinequery/result/InlineQueryResultVenue.java +++ b/telegrambots-meta/src/main/java/org/telegram/telegrambots/meta/api/objects/inlinequery/result/InlineQueryResultVenue.java @@ -189,7 +189,7 @@ public class InlineQueryResultVenue implements InlineQueryResult { throw new TelegramApiValidationException("Longitude parameter can't be empty", this); } if (address == null || address.isEmpty()) { - throw new TelegramApiValidationException("Longitude parameter can't be empty", this); + throw new TelegramApiValidationException("Address parameter can't be empty", this); } if (inputMessageContent != null) { inputMessageContent.validate();