Refactor bot client and add group management commands

Replaced ScoreScrapeBotTelegramClient with StoreScrapeBotTelegramClient and updated related references. Added BaseStoreScraperBotCommand for command error handling. Implemented AddGroupCommand and GetGroupCommand for managing allowed groups via admin commands. Improved CouchbaseUtil to ensure scope and collection creation. Updated logging configuration and environment example. Minor model and repository adjustments for initialization and group handling.
This commit is contained in:
tiennm99 committed 2025-11-04 23:06:46 +07:00
1 parent 774355ee2b
commit bae876b086
16 files changed
+225 -31

No files matched your search

@@ -2,6 +2,7 @@ package com.miti99.storescraperbot;
import com.miti99.storescraperbot.bot.StoreScrapeBot;
import com.miti99.storescraperbot.config.Config;
import com.miti99.storescraperbot.repository.AdminRepository;
import lombok.extern.log4j.Log4j2;
import org.telegram.telegrambots.longpolling.TelegramBotsLongPollingApplication;
@@ -9,6 +10,8 @@ import org.telegram.telegrambots.longpolling.TelegramBotsLongPollingApplication;
public class Main {
public static void main(String[] args) {
AdminRepository.INSTANCE.init();
try (var botsApplication = new TelegramBotsLongPollingApplication()) {
botsApplication.registerBot(Config.TELEGRAM_BOT_TOKEN, StoreScrapeBot.INSTANCE);
log.info("StoreScrapeBot successfully started!");