Android Question Send a compressed file to telegram using the smmtelebot library

matmax

Member
Licensed User
Good night. I'm trying to send a compressed file or document to telegram using the smmtelebot library, but I can't find how to send it. I send videos, photos, text but not files / documents. Somebody could help me. Thank you
 

DonManfred

Expert
Licensed User
Longtime User

 
Last edited:
Upvote 0

matmax

Member
Licensed User
DonManfred, thank you for answering me. The lines of code to send a zip file would be:

Sub Process_Globals
Private Bot As SMMTeleBot
Private chat As Chat
End Sub

Sub SendTelegram()
Bot.Initialize("key bot", "BOT", 120, 120, 120)
Bot.getUpdatesList(0,20,60)
Bot.SendChatAction(chat.Id,"CHAT_ACTION_UPLOAD_DOCUMENT")

' What do I need now to send the file?

End sub

Sub BOT_updates(updates As List)
Dim mensaje As Message
If updates.IsInitialized Then
Try
For up = 0 To updates.Size - 1
Dim Update As Update = updates.Get(up)
mensaje = Update.message
Next
chat = mensaje.Chat
Catch
Log(LastException)
End Try
End If
End Sub


Thank you.
 
Last edited:
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…