在Telegram Bot中使用ReplyKeyboardMarkup时如何不强制回复?

时间:2018-11-16 01:24:29

标签: telegram-bot

我希望我的机器人在发送特定消息时显示一个ReplyKeyboard。键盘在那里,但我不知道为什么它会强制向机器人发出回复。我知道这是一个“回复”键盘,但是我可以在网上找到我想要的示例。

我正在使用Java。我的代码(进行了更改以缩短代码):

library(shiny)
ui <- fluidPage(
  selectInput("A_sel","select", c("A","B","C","D"),"A",FALSE)
  ,selectInput("B_sel","same", c("A","B","C","D"),"A",FALSE)
  ,actionButton("ForceCombi", "force C and D")
)

server <- function(input, output, session) {

  tstamp <- reactiveValues(t = Sys.time())

  observeEvent(input$A_sel, {
    req((Sys.time() - tstamp$t) > 0.5)
    tstamp$t <- Sys.time()
    updateSelectInput(session,"B_sel", selected = input$A_sel)
  })

  observeEvent(input$ForceCombi, {
    updateSelectInput(session,"A_sel", selected = "C")
    updateSelectInput(session,"B_sel", selected = "D")
    tstamp$t <- Sys.time()
  })
}

shinyApp(ui, server)

What I get(忽略废话)。

What I would like to get

0 个答案:

没有答案