Created
February 13, 2026 03:24
-
-
Save reactmore/77c6a9825a8ef70c9086ee3c80869753 to your computer and use it in GitHub Desktop.
External Bot Without Modular
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { botHandler } = require("../../handler"); | |
| const { Api } = require("teleproto"); | |
| botHandler({ | |
| name: "PingExternalBot", | |
| BOT_TOKEN, | |
| commands: [ | |
| // ========================= | |
| // START | |
| // ========================= | |
| { | |
| pattern: "start", | |
| description: "Start command", | |
| callback: async (m) => { | |
| await m.send("External bot is running ๐"); | |
| } | |
| }, | |
| // ========================= | |
| // PING | |
| // ========================= | |
| { | |
| pattern: "ping", | |
| description: "Ping test", | |
| callback: async (m) => { | |
| const start = Date.now(); | |
| await m.send("Testing ping..."); | |
| const end = Date.now(); | |
| await m.send(`Latency: ${end - start} ms`); | |
| } | |
| }, | |
| // ========================= | |
| // INLINE QUERY | |
| // ========================= | |
| { | |
| on: "inline_query", | |
| callback: async (event, client) => { | |
| await client.invoke( | |
| new Api.messages.SetInlineBotResults({ | |
| queryId: event.queryId, | |
| results: [ | |
| new Api.InputBotInlineResult({ | |
| id: "1", | |
| type: "article", | |
| title: "Hello", | |
| description: "Inline result working", | |
| sendMessage: new Api.InputBotInlineMessageText({ | |
| message: "Hello from external bot ๐" | |
| }) | |
| }) | |
| ] | |
| }) | |
| ); | |
| } | |
| } | |
| ] | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment