Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. bot.command('start', ctx => {
  2.   let startMessage = `start message`;
  3.   bot.telegram.sendMessage(ctx.chat.id, startMessage,
  4.     {
  5.       reply_markup: {
  6.         inline_keyboard: [
  7.           [
  8.             { text: "botão", callback_data: 'clique' }
  9.           ]
  10.         ]
  11.       },
  12.       parse_mode: "markdown"
  13.     }
  14.     )
  15.   })
  16.  
  17. bot.action('clique', ctx => {
  18.     let editedMessage = `edited message`;
  19.     ctx.telegram.editMessageText(ctx.chat.id, ctx.message.message_id, undefined, editedMessage,
  20.       {
  21.         reply_markup: {
  22.           inline_keyboard: [
  23.             [
  24.               { text: "⬅️ Voltar", callback_data: 'start' }
  25.             ]
  26.           ]
  27.         },
  28.         parse_mode: "markdown"
  29.       })
  30.   })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement