Skip to content

Commit

Permalink
Telegram Bot API 6.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadiducho committed Dec 3, 2023
1 parent 7734de5 commit 3d787ee
Show file tree
Hide file tree
Showing 30 changed files with 494 additions and 173 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
jdk: [ '8', '19' ]
jdk: [ '11', '21' ]
steps:
- name: Setup Java ${{ matrix.jdk }} JDK
uses: actions/setup-java@v3
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ plugins {
}

group = 'com.cadiducho'
version = '6.5'
sourceCompatibility = '1.8'
version = '6.6'
sourceCompatibility = JavaVersion.VERSION_11

java {
withJavadocJar()
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/cadiducho/telegrambotapi/Animation.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class Animation {
/**
* Optional. Animation thumbnail as defined by sender
*/
private PhotoSize thumb;
private PhotoSize thumbnail;

/**
* Optional. Original animation filename as defined by sender
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/cadiducho/telegrambotapi/Audio.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ public class Audio {
/**
* Optional. Thumbnail of the album cover to which the music file belongs
*/
private PhotoSize thumb;
private PhotoSize thumbnail;
}
163 changes: 113 additions & 50 deletions src/main/java/com/cadiducho/telegrambotapi/BotAPI.java

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions src/main/java/com/cadiducho/telegrambotapi/BotDescription.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* The MIT License
*
* Copyright 2023 Cadiducho.
* Read more in https://github.com/Cadiducho/Telegram-Bot-API/blob/master/LICENSE
*/

package com.cadiducho.telegrambotapi;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@ToString
@Getter @Setter
public class BotDescription {

/**
* The bot's description
*/
private String description;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* The MIT License
*
* Copyright 2023 Cadiducho.
* Read more in https://github.com/Cadiducho/Telegram-Bot-API/blob/master/LICENSE
*/

package com.cadiducho.telegrambotapi;

import com.squareup.moshi.Json;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
* This object represents the bot's short description.
*/
@ToString
@Getter @Setter
public class BotShortDescription {

/**
* The bot's short description
*/
@Json(name = "short_description") private String shortDescription;
}
2 changes: 1 addition & 1 deletion src/main/java/com/cadiducho/telegrambotapi/Document.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class Document {
/**
* Optional. Document thumbnail as defined by sender
*/
private PhotoSize thumb;
private PhotoSize thumbnail;

/**
* Optional. Original filename as defined by sender
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class InputMediaAnimation extends InputMedia {
* 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>.
*/
private Object thumb;
private Object thumbnail;

/**
* Optional. Animation width
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class InputMediaAudio extends InputMedia {
* 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>.
*/
private Object thumb;
private Object thumbnail;

/**
* Optional. Duration of the audio in seconds
Expand All @@ -33,9 +33,9 @@ public class InputMediaAudio extends InputMedia {
*/
private String title;

public InputMediaAudio(String media, Object thumb, String caption, ParseMode parseMode, Integer duration, String performer, String title, Boolean disableContentTypeDetection) {
public InputMediaAudio(String media, Object thumbnail, String caption, ParseMode parseMode, Integer duration, String performer, String title, Boolean disableContentTypeDetection) {
super("audio", media, caption, parseMode, disableContentTypeDetection);
this.thumb = thumb;
this.thumbnail = thumbnail;
this.duration = duration;
this.performer = performer;
this.title = title;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public class InputMediaDocument extends InputMedia {
* 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>.
*/
private Object thumb;
private Object thumbnail;

public InputMediaDocument(String media,Object thumb, String caption, ParseMode parseMode, Boolean disableContentTypeDetection) {
public InputMediaDocument(String media,Object thumbnail, String caption, ParseMode parseMode, Boolean disableContentTypeDetection) {
super("document", media, caption, parseMode, disableContentTypeDetection);
this.thumb = thumb;
this.thumbnail = thumbnail;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class InputMediaVideo extends InputMedia {
* 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>.
*/
private Object thumb;
private Object thumbnail;

/**
* Optional. Video width
Expand All @@ -43,9 +43,9 @@ public class InputMediaVideo extends InputMedia {
*/
@Json(name = "has_spoiler") private Boolean hasSpoiler;

public InputMediaVideo(String media, Object thumb, String caption, ParseMode parseMode, Integer width, Integer height, Integer duration, Boolean supportsStreaming, Boolean disableContentTypeDetection, Boolean hasSpoiler) {
public InputMediaVideo(String media, Object thumbnail, String caption, ParseMode parseMode, Integer width, Integer height, Integer duration, Boolean supportsStreaming, Boolean disableContentTypeDetection, Boolean hasSpoiler) {
super("video", media, caption, parseMode, disableContentTypeDetection);
this.thumb = thumb;
this.thumbnail = thumbnail;
this.width = width;
this.height = height;
this.duration = duration;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/cadiducho/telegrambotapi/Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import com.cadiducho.telegrambotapi.payment.SuccessfulPayment;
import java.util.List;

import com.cadiducho.telegrambotapi.sticker.Sticker;
import com.squareup.moshi.Json;
import lombok.Getter;
import lombok.Setter;
Expand Down
Loading

0 comments on commit 3d787ee

Please sign in to comment.