feat(bot): add i18n support with grammy-i18n package

Add internationalization support to the bot using grammy-i18n package.
Includes English and Russian locale files and updates to session handling.
Disabled db:generate in Dockerfile as it's not needed during build.
This commit is contained in:
Yuu Ottosoka
2025-07-12 16:37:09 +03:00
parent 701e9c0ef8
commit df8bfa049f
8 changed files with 104 additions and 42 deletions

View File

@@ -1,5 +1,5 @@
import { prisma } from "@repo/db";
import { StorageAdapter } from "grammy";
import { prisma } from '@repo/db';
import { StorageAdapter } from 'grammy';
export class PrismaStorageAdapter<T extends object>
implements StorageAdapter<T>
@@ -14,7 +14,6 @@ export class PrismaStorageAdapter<T extends object>
.then((session) => (session?.data as T) || undefined);
}
async write(key: string, data: T): Promise<void> {
console.log("write", data);
await prisma.telegramSession.upsert({
where: {
id: key,