Skip to content

Commit

Permalink
Telegram Bot API 4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadiducho committed Aug 21, 2019
1 parent dd4ba02 commit 7409a04
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.cadiducho</groupId>
<artifactId>TelegramBotAPI</artifactId>
<version>4.4-SNAPSHOT</version>
<version>4.4</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -34,7 +34,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<version>3.1.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -49,7 +49,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<version>3.0.0-M3</version>
</plugin>
</plugins>
</build>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/cadiducho/telegrambotapi/BotAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ default Message sendAnimation(Object chat_id, java.io.File animation) throws Tel
* @param duration Duration of the animation in seconds
* @param width Animation width
* @param height Animation height
* @param thumb Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://\<file_attach_name\>” if the thumbnail was uploaded using multipart/form-data under \<file_attach_name\>.
* @param thumb Thumbnail of the file sent. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail‘s width and height should not exceed 90. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can’t be reused and can be only uploaded as a new file, so you can pass “attach://&lt;file_attach_name&gt;” if the thumbnail was uploaded using multipart/form-data under &lt;file_attach_name&gt;.
* @param caption Animation caption (may also be used when resending videos by file_id), 0-1024 characters
* @param parse_mode Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption.
* @param disable_notification Sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
Expand Down Expand Up @@ -764,8 +764,8 @@ Boolean promoteChatMember(Object chat_id, Integer user_id, Boolean can_change_in
* The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members admin rights.
* @param chat_id Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)
* @param permissions New default chat permissions
* @return
* @throws TelegramException
* @return On success, True is returned.
* @throws com.cadiducho.telegrambotapi.exception.TelegramException if the method fails in Telegram servers
*/
Boolean setChatPermissions(Object chat_id, ChatPermissions permissions) throws TelegramException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ public final void reset() {
* <p>
* Subclasses may override if a different algorithm is required.
* </p>
* @return next back off millis
*/
public long nextBackOffMillis() {
// Make sure we have not gone over the maximum elapsed time.
Expand Down Expand Up @@ -200,7 +201,10 @@ static int getRandomValueFromInterval(
return randomValue;
}

/** Returns the initial retry interval in milliseconds. */
/**
* Returns the initial retry interval in milliseconds.
* @return the initial retry interval in milliseconds.
*/
public final int getInitialIntervalMillis() {
return initialIntervalMillis;
}
Expand All @@ -212,28 +216,32 @@ public final int getInitialIntervalMillis() {
* A randomization factor of 0.5 results in a random period ranging between 50% below and 50%
* above the retry interval.
* </p>
* @return the randomization factor
*/
public final double getRandomizationFactor() {
return randomizationFactor;
}

/**
* Returns the current retry interval in milliseconds.
* @return the current retry interval in milliseconds.
*/
public final int getCurrentIntervalMillis() {
return currentIntervalMillis;
}

/**
* Returns the value to multiply the current interval with for each retry attempt.
* @return the value to multiply the current interval
*/
public final double getMultiplier() {
return multiplier;
}

/**
* Returns the maximum value of the back off period in milliseconds. Once the current interval
* reaches this value it stops increasing.
* Returns the maximum value of the back off period in milliseconds.
* Once the current interval reaches this value it stops increasing.
* @return the maximum value of the back off period in milliseconds
*/
public final int getMaxIntervalMillis() {
return maxIntervalMillis;
Expand All @@ -247,6 +255,7 @@ public final int getMaxIntervalMillis() {
* max_elapsed_time then the method {@link #nextBackOffMillis()} starts returning
* this value. The elapsed time can be reset by calling {@link #reset()}.
* </p>
* @return the maximum elapsed time in milliseconds
*/
public final int getMaxElapsedTimeMillis() {
return maxElapsedTimeMillis;
Expand All @@ -259,6 +268,7 @@ public final int getMaxElapsedTimeMillis() {
* <p>
* The elapsed time is computed using {@link System#nanoTime()}.
* </p>
* @return the elapsed time in milliseconds
*/
public final long getElapsedTimeMillis() {
return (nanoTime() - startTimeNanos) / 1000000;
Expand Down

0 comments on commit 7409a04

Please sign in to comment.