mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
2 lines
5.1 KiB
JavaScript
2 lines
5.1 KiB
JavaScript
import{_ as t,o,c as a,ag as r}from"./chunks/framework.DEqXEGcv.js";const n="/getting-started/platform-telegram-01-platforms.png",l="/getting-started/platform-telegram-02-bindcode.png",u=JSON.parse('{"title":"Configure Telegram Channel","description":"","frontmatter":{},"headers":[],"relativePath":"getting-started/platform-telegram.md","filePath":"getting-started/platform-telegram.md","lastUpdated":1771405736000}'),s={name:"getting-started/platform-telegram.md"};function i(d,e,c,h,p,g){return o(),a("div",null,[...e[0]||(e[0]=[r('<h1 id="configure-telegram-channel" tabindex="-1">Configure Telegram Channel <a class="header-anchor" href="#configure-telegram-channel" aria-label="Permalink to "Configure Telegram Channel""></a></h1><p>This guide walks you through connecting your bot to Telegram, allowing users to chat with your bot via Telegram messages.</p><h2 id="prerequisites" tabindex="-1">Prerequisites <a class="header-anchor" href="#prerequisites" aria-label="Permalink to "Prerequisites""></a></h2><ul><li>Memoh is running (see <a href="/installation/docker.html">Docker installation</a>)</li><li>You have logged in to the Web UI at <a href="http://localhost:8082" target="_blank" rel="noreferrer">http://localhost:8082</a></li><li>You have created a bot (see <a href="/getting-started/create-bot.html">Create Bot</a>)</li><li>A Telegram account</li></ul><h2 id="step-1-create-a-telegram-bot" tabindex="-1">Step 1: Create a Telegram Bot <a class="header-anchor" href="#step-1-create-a-telegram-bot" aria-label="Permalink to "Step 1: Create a Telegram Bot""></a></h2><p>Open Telegram and search for the official bot <code>@BotFather</code>.</p><p>Send the <code>/newbot</code> command to BotFather and follow the prompts:</p><ol><li>Enter a <strong>name</strong> for your bot (display name, e.g., <code>My Memoh Bot</code>)</li><li>Enter a <strong>username</strong> for your bot (must end with <code>bot</code>, e.g., <code>my_memoh_bot</code>)</li></ol><p>BotFather will create the bot and provide a <strong>Bot Token</strong> (e.g., <code>123456789:ABCdefGHIjklMNOpqrsTUVwxyz</code>).</p><p><strong>Save this token securely</strong> — you will need it in the next step.</p><h2 id="step-2-open-the-bot-platforms-page" tabindex="-1">Step 2: Open the Bot Platforms Page <a class="header-anchor" href="#step-2-open-the-bot-platforms-page" aria-label="Permalink to "Step 2: Open the Bot Platforms Page""></a></h2><p>In the Memoh Web UI, click <strong>Bots</strong> in the left sidebar to open the Bots page.</p><p>Select the bot you want to connect to Telegram.</p><p>Click the <strong>Platforms</strong> tab to open the channel configuration page.</p><h2 id="step-3-add-telegram-channel" tabindex="-1">Step 3: Add Telegram Channel <a class="header-anchor" href="#step-3-add-telegram-channel" aria-label="Permalink to "Step 3: Add Telegram Channel""></a></h2><p>Click the <strong>Add Channel</strong> button.</p><p>In the dialog, select <strong>Telegram</strong> as the channel type.</p><p>Fill in the configuration:</p><table tabindex="0"><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><strong>Bot Token</strong></td><td>The token from BotFather (e.g., <code>123456789:ABCdefGHIjklMNOpqrsTUVwxyz</code>)</td></tr></tbody></table><p>Click <strong>Save</strong> to add the channel.</p><p><img src="'+n+'" alt="Add Channel button"></p><h2 id="step-4-bind-your-telegram-account" tabindex="-1">Step 4: Bind Your Telegram Account <a class="header-anchor" href="#step-4-bind-your-telegram-account" aria-label="Permalink to "Step 4: Bind Your Telegram Account""></a></h2><p>Open the Memoh web ui setting page, find <code>Bind Code</code> section, select telegram platform and necessary TTL(seconds), Generate bind code.</p><p><img src="'+l+'" alt="Bind Code"></p><p>Open the bot dialog in telegram, send <code>Bind Code</code> to chat, you should get <code>Binding successful! Your identity has been linked.</code> message if successful</p><p>Click <strong>Save</strong> to complete the binding.</p><h2 id="step-6-test-the-connection" tabindex="-1">Step 6: Test the Connection <a class="header-anchor" href="#step-6-test-the-connection" aria-label="Permalink to "Step 6: Test the Connection""></a></h2><p>Send a message to your bot on Telegram:</p><ul><li>For <code>public</code> bots: Add the bot to a group, have others mention your bot when sending messages.</li><li>For <code>person</code> bots: Send a direct message (requires binding in Step 5)</li></ul><p>The bot should respond according to its configured model and system prompt.</p><h2 id="next-steps" tabindex="-1">Next Steps <a class="header-anchor" href="#next-steps" aria-label="Permalink to "Next Steps""></a></h2><ul><li>Configure <a href="/concepts/memory.html">Memory</a> to enable long-term memory for your bot</li><li>Set up <a href="/concepts/skills.html">Skills</a> to extend your bot's capabilities</li><li>Add <a href="/concepts/schedule.html">Schedules</a> for automated tasks</li></ul>',32)])])}const b=t(s,[["render",i]]);export{u as __pageData,b as default};
|