From f3a464422c63d68c1466a52cf85c81852e415318 Mon Sep 17 00:00:00 2001 From: Azimjon Nazarov <109890132+nazarovv2@users.noreply.github.com> Date: Sat, 6 Apr 2024 23:09:24 +0500 Subject: [PATCH 1/3] Version changed --- pom.xml | 2 +- .../telegrambotspring/bot/MessageSender.java | 2 +- ...ptions.java => TelegramBotAPIOptions.java} | 7 ++++++- .../function/Initialize.java | 15 ------------- .../telegrambotspring/function/Search.java | 21 ------------------- .../longpolling/TelegramLongPollingBot.java | 4 ++-- 6 files changed, 10 insertions(+), 41 deletions(-) rename src/main/java/io/github/nazarovctrl/telegrambotspring/bot/{CtrlBotOptions.java => TelegramBotAPIOptions.java} (74%) delete mode 100644 src/main/java/io/github/nazarovctrl/telegrambotspring/function/Initialize.java delete mode 100644 src/main/java/io/github/nazarovctrl/telegrambotspring/function/Search.java diff --git a/pom.xml b/pom.xml index 7022232..9749078 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,7 @@ io.github.nazarovctrl telegram-bot-spring jar - 1.0.5 + 1.0.6-beta ${project.groupId}:${project.artifactId} Library to make it easier to create a telegram-bot in spring https://github.com/nazarovctrl/telegram-bot-spring diff --git a/src/main/java/io/github/nazarovctrl/telegrambotspring/bot/MessageSender.java b/src/main/java/io/github/nazarovctrl/telegrambotspring/bot/MessageSender.java index 0fde63a..cef78d7 100644 --- a/src/main/java/io/github/nazarovctrl/telegrambotspring/bot/MessageSender.java +++ b/src/main/java/io/github/nazarovctrl/telegrambotspring/bot/MessageSender.java @@ -14,7 +14,7 @@ public class MessageSender extends DefaultAbsSender { /** * @param botConfig bean used to get telegram bot token */ - public MessageSender(CtrlBotOptions botOptions, BotConfig botConfig) { + public MessageSender(TelegramBotAPIOptions botOptions, BotConfig botConfig) { super(botOptions, botConfig.getToken()); } } \ No newline at end of file diff --git a/src/main/java/io/github/nazarovctrl/telegrambotspring/bot/CtrlBotOptions.java b/src/main/java/io/github/nazarovctrl/telegrambotspring/bot/TelegramBotAPIOptions.java similarity index 74% rename from src/main/java/io/github/nazarovctrl/telegrambotspring/bot/CtrlBotOptions.java rename to src/main/java/io/github/nazarovctrl/telegrambotspring/bot/TelegramBotAPIOptions.java index c78c798..fd3b350 100644 --- a/src/main/java/io/github/nazarovctrl/telegrambotspring/bot/CtrlBotOptions.java +++ b/src/main/java/io/github/nazarovctrl/telegrambotspring/bot/TelegramBotAPIOptions.java @@ -4,8 +4,13 @@ import org.springframework.stereotype.Component; import org.telegram.telegrambots.bots.DefaultBotOptions; +/** + * The class for changing base_url + * + * @author Azimjon Nazarov + */ @Component -public class CtrlBotOptions extends DefaultBotOptions { +public class TelegramBotAPIOptions extends DefaultBotOptions { @Value("${bot.base_url:https://api.telegram.org/bot}") private String base_url; diff --git a/src/main/java/io/github/nazarovctrl/telegrambotspring/function/Initialize.java b/src/main/java/io/github/nazarovctrl/telegrambotspring/function/Initialize.java deleted file mode 100644 index 6d8d315..0000000 --- a/src/main/java/io/github/nazarovctrl/telegrambotspring/function/Initialize.java +++ /dev/null @@ -1,15 +0,0 @@ -package io.github.nazarovctrl.telegrambotspring.function; - -/** - * The functional interface for initializing - * - * @author Azimjon Nazarov - */ -@FunctionalInterface -public interface Initialize { - - /** - * The abstract method for initialize when program starts - */ - void initialize(); -} diff --git a/src/main/java/io/github/nazarovctrl/telegrambotspring/function/Search.java b/src/main/java/io/github/nazarovctrl/telegrambotspring/function/Search.java deleted file mode 100644 index b018f70..0000000 --- a/src/main/java/io/github/nazarovctrl/telegrambotspring/function/Search.java +++ /dev/null @@ -1,21 +0,0 @@ -package io.github.nazarovctrl.telegrambotspring.function; - -/** - * The functional interface for searching text with key and languageCode - * - * @param key - * @param languageCode - * @param text - */ -@FunctionalInterface -public interface Search { - - /** - * The abstract method for search button text with key and languageCode - * - * @param key key - * @param languageCode languageCode - * @return text - */ - T search(K key, L languageCode); -} diff --git a/src/main/java/io/github/nazarovctrl/telegrambotspring/longpolling/TelegramLongPollingBot.java b/src/main/java/io/github/nazarovctrl/telegrambotspring/longpolling/TelegramLongPollingBot.java index 674afc4..ba24ce7 100644 --- a/src/main/java/io/github/nazarovctrl/telegrambotspring/longpolling/TelegramLongPollingBot.java +++ b/src/main/java/io/github/nazarovctrl/telegrambotspring/longpolling/TelegramLongPollingBot.java @@ -1,7 +1,7 @@ package io.github.nazarovctrl.telegrambotspring.longpolling; import io.github.nazarovctrl.telegrambotspring.bot.BotConfig; -import io.github.nazarovctrl.telegrambotspring.bot.CtrlBotOptions; +import io.github.nazarovctrl.telegrambotspring.bot.TelegramBotAPIOptions; import io.github.nazarovctrl.telegrambotspring.controller.AbstractUpdateController; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @@ -33,7 +33,7 @@ public class TelegramLongPollingBot extends org.telegram.telegrambots.bots.Teleg * @param botConfig bean * @param updateController bean */ - public TelegramLongPollingBot(CtrlBotOptions options, BotConfig botConfig, AbstractUpdateController updateController) throws TelegramApiException { + public TelegramLongPollingBot(TelegramBotAPIOptions options, BotConfig botConfig, AbstractUpdateController updateController) throws TelegramApiException { super(options, botConfig.getToken()); this.botConfig = botConfig; this.updateController = updateController; From a72addb88d8d3fb4aac6a7878ff4c5cdcc8a1b6a Mon Sep 17 00:00:00 2001 From: Azimjon Nazarov <109890132+nazarovv2@users.noreply.github.com> Date: Sat, 6 Apr 2024 23:10:41 +0500 Subject: [PATCH 2/3] Version changed --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 95ccf6d..be3cb03 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -## [Java documentation](https://javadoc.io/doc/io.github.nazarovctrl/telegram-bot-spring/1.0.5) -## Library [link](https://central.sonatype.com/artifact/io.github.nazarovctrl/telegram-bot-spring/1.0.5) in Maven Central +## [Java documentation](https://javadoc.io/doc/io.github.nazarovctrl/telegram-bot-spring/1.0.6-beta) +## Library [link](https://central.sonatype.com/artifact/io.github.nazarovctrl/telegram-bot-spring/1.0.6-beta) in Maven Central ## Maven dependency io.github.nazarovctrl telegram-bot-spring - 1.0.5 + 1.0.6-beta ## How to use library? From 582fa84387113ee0044494a0275a90743c5f1023 Mon Sep 17 00:00:00 2001 From: Azimjon Nazarov <109890132+nazarovv2@users.noreply.github.com> Date: Sat, 6 Apr 2024 23:52:00 +0500 Subject: [PATCH 3/3] Version changed --- README.md | 6 +++--- pom.xml | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index be3cb03..b0f52c2 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -## [Java documentation](https://javadoc.io/doc/io.github.nazarovctrl/telegram-bot-spring/1.0.6-beta) -## Library [link](https://central.sonatype.com/artifact/io.github.nazarovctrl/telegram-bot-spring/1.0.6-beta) in Maven Central +## [Java documentation](https://javadoc.io/doc/io.github.nazarovctrl/telegram-bot-spring/1.0.6) +## Library [link](https://central.sonatype.com/artifact/io.github.nazarovctrl/telegram-bot-spring/1.0.6) in Maven Central ## Maven dependency io.github.nazarovctrl telegram-bot-spring - 1.0.6-beta + 1.0.6 ## How to use library? diff --git a/pom.xml b/pom.xml index 9749078..6de1d93 100644 --- a/pom.xml +++ b/pom.xml @@ -6,14 +6,18 @@ org.springframework.boot spring-boot-starter-parent - 3.1.2 + 3.1.4 + + 17 + + io.github.nazarovctrl telegram-bot-spring jar - 1.0.6-beta + 1.0.6 ${project.groupId}:${project.artifactId} Library to make it easier to create a telegram-bot in spring https://github.com/nazarovctrl/telegram-bot-spring @@ -41,7 +45,7 @@ Azimjon Nazarov nazarovazimjon3@gmail.com io.github.nazarovctrl - http://github.com/nazarovctrl/ + https://github.com/nazarovctrl/ @@ -51,10 +55,6 @@ https://github.com/nazarovctrl/telegram-bot-spring/tree/master - - 17 - - release