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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user