Skip to content

hubgram/tdbot.lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

tdbot.lua

A simple Lua library for the telegram-bot. just an update based on telegram-cli library for new TG.

documentation >> soon...

How to Use

See example script below.

  • Place this tdbot.lua file inside the same folder as your bot, or anywhere else as long as you import it properly.
  • Import it into your bot.
  • Call the functions.

See example script below.

-- Load tdbot library.
tdbot = dofile('tdbot.lua')


function tdbot_update_callback (data)
  if (data._ == "updateNewMessage") then
    local msg = data.message
    if msg.content._ == "messageText" then
      if msg.content.text == "ping" then
	tdbot.sendText(msg.chat_id, 0, true, true, nil, "PONG")
      end
    end
  end
end

The Functions

tdbot.lua is a Work In Progress. This commit is based on telegram-bot-170901.tl scheme. Here is a list of functions that's should works.

  • getAuthState
  • setAuthPhoneNumber
  • resendAuthCode
  • checkAuthCode
  • checkAuthPassword
  • requestAuthPasswordRecovery
  • recoverAuthPassword
  • resetAuth
  • checkAuthBotToken
  • getPasswordState
  • setPassword
  • getRecoveryEmail
  • setRecoveryEmail
  • requestPasswordRecovery
  • recoverPassword
  • createTemporaryPassword
  • getMe
  • getUser
  • getUserFull
  • getGroup
  • getGroupFull
  • getChannel
  • getChannelFull
  • getSecretChat
  • getChat
  • getMessage
  • getMessages
  • getFile
  • getFilePersistent
  • getChats
  • searchPublicChat
  • searchPublicChats
  • searchChats
  • getTopChats
  • deleteTopChat
  • addRecentlyFoundChat
  • deleteRecentlyFoundChat
  • deleteRecentlyFoundChats
  • getCommonChats
  • getCreatedPublicChats
  • getChatHistory
  • deleteChatHistory
  • searchChatMessages
  • searchMessages
  • searchSecretMessages
  • searchCallMessages
  • getPublicMessageLink
  • sendBotStartMessage
  • sendInlineQueryResultMessage
  • forwardMessages
  • sendChatScreenshotTakenNotification
  • sendChatSetTtlMessage
  • deleteMessages
  • deleteMessagesFromUser
  • editMessageText
  • editMessageCaption
  • editMessageReplyMarkup
  • editInlineMessageText
  • editInlineMessageCaption
  • editInlineMessageReplyMarkup
  • getTextEntities
  • getFileMimeType
  • getInlineQueryResults
  • answerInlineQuery
  • getCallbackQueryAnswer
  • answerCallbackQuery
  • answerShippingQuery
  • answerPreCheckoutQuery
  • setGameScore
  • setInlineGameScore
  • getGameHighScores
  • getInlineGameHighScores
  • deleteChatReplyMarkup
  • sendChatAction
  • openChat
  • closeChat
  • viewMessages
  • openMessageContent
  • createPrivateChat
  • createGroupChat
  • createChannelChat
  • createSecretChat
  • createNewGroupChat
  • createNewChannelChat
  • createNewSecretChat
  • migrateGroupChatToChannelChat
  • changeChatTitle
  • changeChatPhoto
  • changeChatDraftMessage
  • toggleChatIsPinned
  • setChatClientData
  • addChatMember
  • addChatMembers
  • changeChatMemberStatus
  • getChatMember
  • searchChatMembers
  • setPinnedChats
  • downloadFile
  • cancelDownloadFile
  • uploadFile
  • cancelUploadFile
  • setFileGenerationProgress
  • finishFileGeneration
  • exportChatInviteLink
  • checkChatInviteLink
  • importChatInviteLink
  • createCall
  • acceptCall
  • rateCall
  • blockUser
  • unblockUser
  • getBlockedUsers
  • importContacts
  • searchContacts
  • deleteContacts
  • getUserProfilePhotos
  • getStickers
  • getInstalledStickerSets
  • getArchivedStickerSets
  • getTrendingStickerSets
  • getAttachedStickerSets
  • getStickerSet
  • searchStickerSet
  • changeStickerSet
  • viewTrendingStickerSets
  • reorderInstalledStickerSets
  • getRecentStickers
  • addRecentSticker
  • deleteRecentSticker
  • clearRecentStickers
  • getStickerEmojis
  • getSavedAnimations
  • addSavedAnimation
  • deleteSavedAnimation
  • getRecentInlineBots
  • searchHashtags
  • deleteRecentHashtag
  • getWebPagePreview
  • getWebPageInstantView
  • getNotificationSettings
  • setNotificationSettings
  • resetAllNotificationSettings
  • setProfilePhoto
  • deleteProfilePhoto
  • changeName
  • changeAbout
  • changeUsername
  • changePhoneNumber
  • resendChangePhoneNumberCode
  • checkChangePhoneNumberCode
  • getActiveSessions
  • terminateSession
  • terminateAllOtherSessions
  • toggleGroupEditors
  • changeChannelUsername
  • toggleChannelInvites
  • toggleChannelSignMessages
  • changeChannelAbout
  • pinChannelMessage
  • unpinChannelMessage
  • reportChannelSpam
  • getChannelMembers
  • deleteChannel
  • closeSecretChat
  • getChatEventLog
  • getPaymentForm
  • validateOrderInfo
  • sendPaymentForm
  • getPaymentReceipt
  • getSavedOrderInfo
  • deleteSavedOrderInfo
  • deleteSavedCredentials
  • getSupportUser
  • getWallpapers
  • registerDevice
  • setPrivacy
  • getPrivacy
  • getOption
  • setOption
  • changeAccountTtl
  • getAccountTtl
  • deleteAccount
  • getChatReportSpamState
  • changeChatReportSpamState
  • reportChat
  • getStorageStatistics
  • getStorageStatisticsFast
  • optimizeStorage
  • setNetworkType
  • getNetworkStatistics
  • addNetworkStatistics
  • resetNetworkStatistics
  • setBotUpdatesStatus
  • uploadStickerFile
  • createNewStickerSet
  • addStickerToSet
  • setStickerPositionInSet
  • deleteStickerFromSet
  • sendCustomRequest
  • answerCustomQuery
  • sendCustomRequest
  • setAlarm
  • getInviteText
  • getTermsOfService
  • setProxy
  • getProxy
  • sendText
  • sendAnimation
  • sendAudio
  • sendDocument
  • sendPhoto
  • sendSticker
  • sendVideo
  • sendVideoNote
  • sendVoice
  • sendLocation
  • sendVenue
  • sendContact
  • sendGame
  • sendInvoice
  • sendForwarded

About

A simple Lua library for the telegram-bot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages