code clean
This commit is contained in:
parent
0e7c94f39e
commit
b3236bb931
@ -11,7 +11,6 @@ import jakarta.annotation.PreDestroy;
|
||||
import lombok.NonNull;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.data.jpa.repository.JpaContext;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.telegram.telegrambots.bots.TelegramLongPollingBot;
|
||||
import org.telegram.telegrambots.meta.TelegramBotsApi;
|
||||
@ -37,9 +36,7 @@ public class TelegramBot extends TelegramLongPollingBot {
|
||||
|
||||
private final DefaultBotSession session;
|
||||
|
||||
private final JpaContext jpaContext;
|
||||
|
||||
public TelegramBot(final TelegramConfig config, final ObjectMapper objectMapper, final ApplicationEventPublisher publisher, final JpaContext jpaContext) throws TelegramApiException {
|
||||
public TelegramBot(final TelegramConfig config, final ObjectMapper objectMapper, final ApplicationEventPublisher publisher) throws TelegramApiException {
|
||||
super(config.getToken());
|
||||
|
||||
this.config = config;
|
||||
@ -51,7 +48,6 @@ public class TelegramBot extends TelegramLongPollingBot {
|
||||
session = (DefaultBotSession) api.registerBot(this);
|
||||
log.info("Telegram bot registered.");
|
||||
this.objectMapper = objectMapper;
|
||||
this.jpaContext = jpaContext;
|
||||
}
|
||||
|
||||
@PreDestroy
|
||||
|
||||
Loading…
Reference in New Issue
Block a user