-
Notifications
You must be signed in to change notification settings - Fork 488
Open
Description
Hello friends! :)
Thank you for this project!
Please help me, I can't think of a solution to run the /run docker ps command by button.
bot.command("test_command", function (msg, reply, next) {
reply.inlineKeyboard([
[
{ text: "Run docker ps", callback_data: "1" }
]
]);
reply.markdown("Please, choose an action");
});
bot.callback((query, next)=>{
if (query.data === '1') {
reply.text('/run docker ps').forceReply();
} else {
return next()
}
});
I can't figure out how exactly to write bot.callback so(or something else) that the /run docker ps command (or all other commands with /run) will be executed when the button is pressed in the terminal.
Unfortunately I am very weak with JS.
P.S I was able to figure out how to use /setcommands through BotFather, but I would like to use the button.
Metadata
Metadata
Assignees
Labels
No labels