From 4fbbccb0a2967af0c92ff19fe337467347d9a91a Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Tue, 26 Aug 2025 22:12:06 +0300 Subject: [PATCH] refactor(bot): remove Redis integration from bot configuration - Eliminated Redis instance and related storage client from the bot's configuration, streamlining the setup and reducing dependencies. - Updated bot middleware to enhance performance and maintainability. --- apps/bot/src/bot/index.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/apps/bot/src/bot/index.ts b/apps/bot/src/bot/index.ts index 06f1b7e..a947a6e 100644 --- a/apps/bot/src/bot/index.ts +++ b/apps/bot/src/bot/index.ts @@ -8,7 +8,6 @@ import { setCommands } from './settings/commands'; import { setInfo } from './settings/info'; import { env } from '@/config/env'; import { logger } from '@/utils/logger'; -import { getRedisInstance } from '@/utils/redis'; import { autoChatAction } from '@grammyjs/auto-chat-action'; import { conversations } from '@grammyjs/conversations'; import { hydrate } from '@grammyjs/hydrate'; @@ -19,8 +18,6 @@ type Parameters_ = { token: string; }; -const redis = getRedisInstance(); - export function createBot({ token }: Parameters_) { const bot = new Bot(token); @@ -33,7 +30,6 @@ export function createBot({ token }: Parameters_) { onLimitExceeded: async (ctx) => { await ctx.reply(ctx.t('err-limit-exceeded')); }, - storageClient: redis, timeFrame: env.RATE_LIMIT_TIME, }), );