-
-
Save darkdeathoriginal/57995db444bdcafd004887a7de82e9c6 to your computer and use it in GitHub Desktop.
pingtest.js
This file contains 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 { startCommand, pingCommand } = require("../utils/defaultCommands"); | |
botHandler({ | |
name: "ping", | |
BOT_TOKEN, | |
commands: [ | |
pingCommand, | |
startCommand, | |
{ | |
on:"inline_query", | |
callback:async (event,client)=>{ | |
const query = event.query; | |
await client.invoke( | |
new Api.messages.SetInlineBotResults({ | |
queryId: event.queryId, | |
results: [ | |
new Api.InputBotInlineResult({ | |
id: "1", | |
title: "title", | |
description: "description", | |
type: "article", | |
sendMessage: new Api.InputBotInlineMessageText({ | |
message: "Hello world", | |
}), | |
}), | |
], | |
}) | |
) | |
} | |
} | |
], | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment