diff --git a/src/Bot.ts b/src/Bot.ts index 70d525a..a4583e0 100644 --- a/src/Bot.ts +++ b/src/Bot.ts @@ -3,15 +3,11 @@ import { Context, Telegraf } from 'telegraf' import { Fetcher } from './Fetcher.js' import { Scraper } from './Scraper.js' import config from './config/config.js' -import { User } from './db/postgres/schemas/user.schema.js' import { CallbackQuery } from './interfaces/callback-query.interface.js' +import { MyContext } from './interfaces/context.js' import { IResult } from './interfaces/result.interface.js' import { decreaseCredits } from './user.repository.js' -interface MyContext extends Context { - user: User -} - // App class export default class App { bot: Telegraf diff --git a/src/interfaces/context.ts b/src/interfaces/context.ts new file mode 100644 index 0000000..c3f3f0e --- /dev/null +++ b/src/interfaces/context.ts @@ -0,0 +1,6 @@ +import { Context } from 'telegraf' +import { User } from '../db/postgres/schemas/user.schema' + +export interface MyContext extends Context { + user: User +}