1

我在我的树莓派上运行一个小电报机器人

telegram-cli -W -s recieve.lua

这是我的 lua 文件的片段:

function on_msg_receive (msg)
  if msg.text == nil then
    return
  end
  if string.sub(msg.text, 0, 1) ~= "/" then
    return
  end
  mark_read(msg.from.print_name)
end

但是消息没有标记为已读,也许命令不正确?

4

1 回答 1

-1

将此行添加到您的机器人

mark_read(receiver, ok_cb, true)

当你想禁用它时,只需评论它:)

于 2015-09-24T06:01:19.500 回答