diff --git a/README.md b/README.md index 95ccf6d..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.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) +## 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.5 + 1.0.6 ## How to use library? diff --git a/pom.xml b/pom.xml index 7022232..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.5 + 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 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;