global fix and update bot Api
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user