Below is an example of Hello world. This code is similar to what you find in other Telegram bot libraries. Luagram can do much more than that!
local Luagram = require("Luagram")
local bot = Luagram.new("...your token from Botfather...")
bot:on_message(function(message)
bot:send_message({
chat_id = message.chat.id,
text = "Hello World!"
})
end)
local Luagram = require("Luagram")
local bot = Luagram.new("...your token from Botfather...")
bot:on_message(function(message)
bot:send_message({
chat_id = message.chat.id,
text = "Hello World!"
})
end)
Luagram = require "Luagram"
bot = Luagram.new "...your token from Botfather..."
bot\on_message (messsage) ->
bot\send_message
chat_id: message.chat.id,
text: "Hello World!"
Luagram = require "Luagram"
with Luagram.new "...your token from Botfather..."
\on_message (messsage) ->
\send_message
chat_id: message.chat.id,
text: "Hello World!"