diff --git a/apps/bot/src/bot/features/index.ts b/apps/bot/src/bot/features/index.ts index 994439c..b791d7a 100644 --- a/apps/bot/src/bot/features/index.ts +++ b/apps/bot/src/bot/features/index.ts @@ -1,2 +1,3 @@ export * from './download'; +export * from './unhandled'; export * from './welcome'; diff --git a/apps/bot/src/bot/features/unhandled.ts b/apps/bot/src/bot/features/unhandled.ts index b376890..281e83e 100644 --- a/apps/bot/src/bot/features/unhandled.ts +++ b/apps/bot/src/bot/features/unhandled.ts @@ -14,4 +14,4 @@ feature.on('callback_query', logHandle('unhandled-callback-query'), (ctx) => { return ctx.answerCallbackQuery(); }); -export { composer as unhandledFeature }; +export { composer as unhandled }; diff --git a/apps/bot/src/bot/index.ts b/apps/bot/src/bot/index.ts index 48b976b..8f02276 100644 --- a/apps/bot/src/bot/index.ts +++ b/apps/bot/src/bot/index.ts @@ -1,7 +1,6 @@ /* eslint-disable n/callback-return */ import { type Context } from './context'; import * as features from './features'; -import { unhandledFeature } from './features/unhandled'; import { errorHandler } from './handlers/errors'; import { i18n } from './i18n'; import * as middlewares from './middlewares'; @@ -68,11 +67,9 @@ export function createBot({ apiRoot, token }: Parameters_) { protectedBot.use(autoChatAction(bot.api)); protectedBot.use(hydrate()); - for (const feature of Object.values(features)) { - protectedBot.use(feature); - } - - protectedBot.use(unhandledFeature); + protectedBot.use(features.welcome); + protectedBot.use(features.download); + protectedBot.use(features.unhandled); return bot; }