global fix and update bot Api

This commit is contained in:
lendry
2026-06-26 13:01:52 +03:00
parent d3ea470d02
commit aa228d84eb
29 changed files with 980 additions and 221 deletions

View File

@@ -213,6 +213,11 @@ export function BotManageMiniAppContent({
showToast('Токен скопирован');
}
async function copyBotId() {
await navigator.clipboard.writeText(botId);
showToast('bot_id скопирован');
}
if (!botId) {
return <div className="flex min-h-screen items-center justify-center p-6 text-sm text-[#667085]">Не указан botId</div>;
}
@@ -294,6 +299,29 @@ export function BotManageMiniAppContent({
</SectionCard>
</div>
<div className="space-y-4 rounded-[24px] bg-white p-5 shadow-sm">
<SectionCard
icon={Copy}
title="ID и chat_id"
description="Данные для Bot API-скриптов и интеграций"
>
<div className="space-y-2">
<label className="text-sm font-medium">bot_id</label>
<div className="flex items-center gap-2">
<Input value={botId} readOnly className="rounded-xl font-mono text-xs" />
<Button type="button" variant="secondary" className="rounded-xl" onClick={() => void copyBotId()}>
<Copy className="h-4 w-4" />
</Button>
</div>
</div>
<div className="rounded-2xl bg-[#f4f5f8] p-3 text-sm leading-relaxed text-[#667085]">
Чтобы получить <span className="font-mono text-[#1f2430]">chat_id</span> для отправки сообщений этому боту,
добавьте <span className="font-medium text-[#1f2430]">GetMyIdBot</span> в семью и отправьте ему
<span className="font-mono text-[#1f2430]"> /id</span>. Он покажет готовый chat_id для каждого вашего бота.
</div>
</SectionCard>
</div>
<div className="space-y-4 rounded-[24px] bg-white p-5 shadow-sm">
<SectionCard
icon={TextQuote}