io.github.zhyshko.core.bot.RequestHandlerBot Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of BotIO Show documentation
Show all versions of BotIO Show documentation
A framework for easy Telegram Bot creation
package io.github.zhyshko.core.bot;
import io.github.zhyshko.core.configuration.ClientConfiguration;
import io.github.zhyshko.core.consumer.UpdatesConsumer;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
import org.telegram.telegrambots.longpolling.interfaces.LongPollingUpdateConsumer;
import org.telegram.telegrambots.longpolling.starter.SpringLongPollingBot;
@Component
@RequiredArgsConstructor
public class RequestHandlerBot implements SpringLongPollingBot {
private final UpdatesConsumer updatesConsumer;
private final ClientConfiguration configuration;
@Override
public String getBotToken() {
return configuration.getBotToken();
}
@Override
public LongPollingUpdateConsumer getUpdatesConsumer() {
return updatesConsumer;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy