SkillAgentSearch skills...

Tdbot.lua

Lua wrapper for telegram-bot

Install / Use

/learn @rizaumami/Tdbot.lua
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

tdbot.lua

A simple Lua wrapper for tdbot.

See wiki for documentation.

How to Use

  • Put tdbot.lua on a same directory level with the bot script
  • Import tdbot.lua into the bot.
  • Call the functions.

See example script below.

-- Load tdbot library.
local tdbot = require 'tdbot'

function tdbot_update_callback (data)
  if (data["@type"] == "updateNewMessage") then
    local msg = data.message

    if msg.content["@type"] == "messageText" then
      if msg.content.text.text == "ping" then
        tdbot.sendText(msg.chat_id, msg.id, '<b>pong!</b>', 'html')
      end
    end
  end
end

The Functions

tdbot.lua is a Work In Progress. This commit is based on:

  • tdbot commit https://github.com/vysheng/tdbot/commit/a838e8768f1c405306975763d59d48ca9f347805
  • td_api.tl from td commit https://github.com/tdlib/td/commit/cfe4d9bdcee9305632eb228a46a95407d05b5c7a

Here is a list of tdbot methods. Checked functions has been tested and works or at least returned "ok".

Related Skills

View on GitHub
GitHub Stars24
CategoryDevelopment
Updated20d ago
Forks21

Languages

Lua

Security Score

95/100

Audited on Mar 11, 2026

No findings