Skip to content

Instantly share code, notes, and snippets.

@darkdeathoriginal
Last active May 7, 2024 07:20
Show Gist options
  • Save darkdeathoriginal/57995db444bdcafd004887a7de82e9c6 to your computer and use it in GitHub Desktop.
Save darkdeathoriginal/57995db444bdcafd004887a7de82e9c6 to your computer and use it in GitHub Desktop.
pingtest.js
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