feat: add support for donation link in bot descriptions and update short descriptions
This commit is contained in:
parent
7cc225ca47
commit
4e5631487f
@ -10,9 +10,9 @@ description =
|
|||||||
⚡ Simply send the video link, and the bot will download it for you.
|
⚡ Simply send the video link, and the bot will download it for you.
|
||||||
|
|
||||||
short-description =
|
short-description =
|
||||||
Download TikTok, Instagram and YouTube videos and images.
|
Bot downloads videos and pictures
|
||||||
|
Support: @v_dev_support
|
||||||
For any questions: @v_dev_support
|
Donate: { $donateLink }
|
||||||
|
|
||||||
|
|
||||||
start =
|
start =
|
||||||
|
|||||||
@ -10,9 +10,9 @@ description =
|
|||||||
⚡ Просто отправьте ссылку на видео и изображения, и бот сразу скачает его для вас!
|
⚡ Просто отправьте ссылку на видео и изображения, и бот сразу скачает его для вас!
|
||||||
|
|
||||||
short-description =
|
short-description =
|
||||||
Скачивай видео и изображения из TikTok, Instagram и YouTube.
|
Бот скачивает видео и изображения
|
||||||
|
Поддержка: @v_dev_support
|
||||||
По всем вопросам: @v_dev_support
|
Поблагодарить: { $donateLink }
|
||||||
|
|
||||||
|
|
||||||
start =
|
start =
|
||||||
|
|||||||
@ -1,10 +1,13 @@
|
|||||||
import { type Context } from '../context';
|
import { type Context } from '../context';
|
||||||
import { i18n } from '../i18n';
|
import { i18n } from '../i18n';
|
||||||
|
import { env } from '@/config/env';
|
||||||
import { type Api, type Bot, type RawApi } from 'grammy';
|
import { type Api, type Bot, type RawApi } from 'grammy';
|
||||||
|
|
||||||
export async function setInfo({ api }: Bot<Context, Api<RawApi>>) {
|
export async function setInfo({ api }: Bot<Context, Api<RawApi>>) {
|
||||||
for (const locale of i18n.locales) {
|
for (const locale of i18n.locales) {
|
||||||
await api.setMyDescription(i18n.t(locale, 'description'));
|
await api.setMyDescription(i18n.t(locale, 'description'));
|
||||||
await api.setMyShortDescription(i18n.t(locale, 'short-description'));
|
await api.setMyShortDescription(
|
||||||
|
i18n.t(locale, 'short-description', { donateLink: env.DONATE_LINK }),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { z } from 'zod';
|
|||||||
|
|
||||||
export const envSchema = z.object({
|
export const envSchema = z.object({
|
||||||
BOT_TOKEN: z.string(),
|
BOT_TOKEN: z.string(),
|
||||||
|
DONATE_LINK: z.string(),
|
||||||
RATE_LIMIT: z
|
RATE_LIMIT: z
|
||||||
.string()
|
.string()
|
||||||
.transform((value) => Number.parseInt(value, 10))
|
.transform((value) => Number.parseInt(value, 10))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user