lua-telegram-bot-api icon indicating copy to clipboard operation
lua-telegram-bot-api copied to clipboard

json error

Open xerox-xeon opened this issue 6 years ago • 2 comments

oroutine 0: [C]: in function 'encode' ...local/openresty/site/lualib/telegram-bot-api/methods.lua:35: in function 'new' /usr/local/openresty/nginx/telegram.lua:3: in main chunk, client: x.x.x.x.x, server: localhost, request: "POST /telegram HTTP/1.1", host: "x.x.x.x.x" 2019/06/12 10:48:42 [error] 1299#1299: *3504 lua entry thread aborted: runtime error: ...local/openresty/site/lualib/telegram-bot-api/methods.lua:35: Cannot serialise function: type not supported stack traceback:

xerox-xeon avatar Jun 12 '19 02:06 xerox-xeon

Please paste the code that generated this error.

yangm97 avatar Jun 20 '19 12:06 yangm97

Hello!

local api = require("telegram-bot-api.methods"):new("***")

local ok, err = api.send_message{
  chat_id = ***,
  text = "Hello World",
  parse_mode = "html"
  }

if not ok then
  print("Error while sending message: "..err.description)
end

This code (exact from example gives me the same error)

I'm using docker image:

FROM openresty/openresty:buster-fat RUN opm get yangm97/lua-telegram-bot-api

goodprogrammist avatar Jan 22 '20 09:01 goodprogrammist