Tdbot.lua
Lua wrapper for telegram-bot
Install / Use
/learn @rizaumami/Tdbot.luaREADME
tdbot.lua
A simple Lua wrapper for tdbot.
See wiki for documentation.
How to Use
- Put
tdbot.luaon a same directory level with the bot script - Import
tdbot.luainto 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:
tdbotcommit https://github.com/vysheng/tdbot/commit/a838e8768f1c405306975763d59d48ca9f347805td_api.tlfromtdcommit 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".
- [x] getAuthorizationState
- [ ] setTdlibParameters
- [ ] checkDatabaseEncryptionKey
- [ ] setAuthenticationPhoneNumber
- [x] resendAuthenticationCode
- [ ] checkAuthenticationCode
- [ ] checkAuthenticationPassword
- [ ] requestAuthenticationPasswordRecovery
- [ ] recoverAuthenticationPassword
- [x] checkAuthenticationBotToken
- [x] logOut
- [x] close
- [x] destroy
- [ ] setDatabaseEncryptionKey
- [x] getPasswordState
- [x] setPassword
- [x] getRecoveryEmailAddress
- [x] setRecoveryEmailAddress
- [x] requestPasswordRecovery
- [x] recoverPassword
- [x] createTemporaryPassword
- [x] getTemporaryPasswordState
- [ ] processDcUpdate
- [x] getMe
- [x] getUser
- [x] getUserFullInfo
- [x] getBasicGroup
- [x] getBasicGroupFullInfo
- [x] getSupergroup
- [x] getSupergroupFullInfo
- [x] getSecretChat
- [x] getChat
- [x] getMessage
- [x] getRepliedMessage
- [x] getChatPinnedMessage
- [x] getMessages
- [x] getFile
- [x] getRemoteFile
- [x] getChats
- [x] searchPublicChat
- [x] searchPublicChats
- [x] searchChats
- [x] searchChatsOnServer
- [x] getTopChats
- [x] removeTopChat
- [x] addRecentlyFoundChat
- [x] removeRecentlyFoundChat
- [x] clearRecentlyFoundChats
- [x] checkChatUsername
- [x] getCreatedPublicChats
- [x] getGroupsInCommon
- [x] getChatHistory
- [x] deleteChatHistory
- [x] searchChatMessages
- [x] searchMessages
- [x] searchSecretMessages
- [x] searchCallMessages
- [ ] searchChatRecentLocationMessages
- [ ] getActiveLiveLocationMessages
- [x] getChatMessageByDate
- [x] getPublicMessageLink
- [x] sendMessage
- [x] sendMessageAlbum
- [x] sendBotStartMessage
- [x] sendInlineQueryResultMessage
- [x] forwardMessages
- [x] sendChatSetTtlMessage
- [x] sendChatScreenshotTakenNotification
- [x] deleteMessages
- [x] deleteChatMessagesFromUser
- [x] editMessageText
- [ ] editMessageLiveLocation
- [x] editMessageCaption
- [ ] editMessageReplyMarkup
- [ ] editInlineMessageText
- [ ] editInlineMessageLiveLocation
- [ ] editInlineMessageCaption
- [ ] editInlineMessageReplyMarkup
- [x] getTextEntities
- [x] parseTextEntities
- [x] getFileMimeType
- [x] getFileExtension
- [x] getInlineQueryResults
- [ ] answerInlineQuery
- [x] getCallbackQueryAnswer
- [ ] answerCallbackQuery
- [ ] answerShippingQuery
- [ ] answerPreCheckoutQuery
- [ ] setGameScore
- [ ] setInlineGameScore
- [ ] getGameHighScores
- [ ] getInlineGameHighScores
- [x] deleteChatReplyMarkup
- [x] sendChatAction
- [x] openChat
- [x] closeChat
- [x] viewMessages
- [x] [openMessageContent](https:/
Related Skills
node-connect
343.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
90.0kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
343.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
343.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
