Files
CoreControl/docs/.vitepress/dist/assets/notifications_Telegram.md.B9HZvnCz.js
headlesdev 94ba5e20c6 Revert "cleanup v2"
This reverts commit 8b82578809.
2025-05-17 12:31:27 +02:00

17 lines
8.0 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{_ as e,c as n,o as l,ag as t,j as s,a as i}from"./chunks/framework.DPDPlp3K.js";const c=JSON.parse('{"title":"Telegram Notification Setup","description":"","frontmatter":{},"headers":[],"relativePath":"notifications/Telegram.md","filePath":"notifications/Telegram.md","lastUpdated":1745963966000}'),h={name:"notifications/Telegram.md"};function p(o,a,k,r,d,E){return l(),n("div",null,a[0]||(a[0]=[t('<h1 id="telegram-notification-setup" tabindex="-1">Telegram Notification Setup <a class="header-anchor" href="#telegram-notification-setup" aria-label="Permalink to &quot;Telegram Notification Setup&quot;"></a></h1><p>To enable Telegram notifications, you need the following:</p><ul><li><p><strong>Bot Token</strong><br> Generated by @BotFather when you create your bot.</p></li><li><p><strong>Chat ID</strong><br> A unique identifier for the target chat (user, group, or channel).</p></li></ul><h2 id="how-to-create-the-bot-and-get-the-bot-token" tabindex="-1">How to create the bot and get the Bot Token <a class="header-anchor" href="#how-to-create-the-bot-and-get-the-bot-token" aria-label="Permalink to &quot;How to create the bot and get the Bot Token&quot;"></a></h2>',4),s("ol",null,[s("li",null,[i("Open Telegram and start a conversation with "),s("strong",null,"@BotFather"),i(".")]),s("li",{index:"1"},[i("Send the command "),s("code",null,"/newbot"),i(", then follow the prompts to choose a name and username (must end with “bot”). :contentReference[oaicite:1]")]),s("li",null,[i("After completion, @BotFather replies with a message containing:"),s("div",{class:"language- vp-adaptive-theme"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"}),s("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},[s("code",null,[s("span",{class:"line"},[s("span",null,"Use this token to access the HTTP API:")]),i(`
`),s("span",{class:"line"},[s("span",null,"123456789:ABCdefGhIJKlmNoPQRsTuvWxYZ")])])])]),i("Copy this token—this is your "),s("strong",null,"Bot Token"),i(".")])],-1),s("h2",{id:"how-to-obtain-the-chat-id",tabindex:"-1"},[i("How to obtain the Chat ID "),s("a",{class:"header-anchor",href:"#how-to-obtain-the-chat-id","aria-label":'Permalink to "How to obtain the Chat ID"'},"")],-1),s("ol",null,[s("li",null,"Start a chat with your new bot (send it any message)."),s("li",null,[i("Open in your browser:"),s("div",{class:"language- vp-adaptive-theme"},[s("button",{title:"Copy Code",class:"copy"}),s("span",{class:"lang"}),s("pre",{class:"shiki shiki-themes github-light github-dark vp-code",tabindex:"0"},[s("code",null,[s("span",{class:"line"},[s("span",null,"https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getUpdates")])])])])]),s("li",{index:"3"},[i("Look for the "),s("code",null,'"chat":{"id":...}'),i(" field in the returned JSON. That number is the "),s("strong",null,"Chat ID"),i(". :contentReference[oaicite:3]")])],-1),t(`<h3 id="example-getupdates-response-excerpt" tabindex="-1">Example: getUpdates response excerpt <a class="header-anchor" href="#example-getupdates-response-excerpt" aria-label="Permalink to &quot;Example: getUpdates response excerpt&quot;"></a></h3><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;ok&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;result&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;update_id&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">123456789</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;message&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: {</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;message_id&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;from&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: { </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;id&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">987654321</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;is_bot&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;first_name&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;User&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;chat&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: { </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;id&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">987654321</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;first_name&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;User&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">&quot;type&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;private&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;date&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1610000000</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> &quot;text&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;Hello&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ]</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p><em>Here, the Chat ID is <code>987654321</code>.</em></p>`,3)]))}const u=e(h,[["render",p]]);export{c as __pageData,u as default};