Spanish Envio de texto a un canal de telegram

matmax

Member
Licensed User
Hola buenas noches. Tengo un problema a ver si me podeis ayudar. Estoy intentando enviar un texto y un archivo zip a un canal de telegram, no a un chat. El problema es que al enviar el texto y el archivo a telegram me salta un error, como si el id, que parte aparece en el telegram web, no fuese el correcto.

' Inicializo el bot con token de token_not
Bot.Initialize("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxx", "BOT", 120, 120, 120)

' TEXTO
Dim chFechaHoras, chtProblema, chtSolucion, cTotal As String
chFechaHoras = "(FECHA): " & Variables.cursorParte.GetString("FECHA_ENTR_CLI")
chtProblema = "(PROVEE.): " & Variables.cursorParte.GetString("APELLIDOS_CLI") & Chr(13) & Chr(10) & "(TIPO DOC.): " & Variables.cursorParte.GetString("AVERIA_CLI")
chtSolucion ="(EMPRESA): " & Variables.cursorParte.GetString("TECNICO_CLI") & Chr(13) & Chr(10) & "(Nº DOC.): " & Variables.cursorParte.GetString("REPARACION_CLI")
cTotal= "(TOTAL): " &Variables.cursorParte.GetString("TOTAL")
Bot.sendMessage("-100XXXXXXXXXX", "------ ------" & Chr(13) & Chr(10) & nEntrada & " " & chFechaHoras & Chr(13) & Chr(10) & chtProblema & Chr(13) & Chr(10) & chtSolucion & Chr(13) & Chr(10) & cTotal, 0, 0, Null)

Este es el mensaje que me sale en el log del b4a

** Activity (procedimientosconeventos) Resume **
procedimientosconeventos_enviartelegram (java line: 2226)
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "sender_chat" (class io.fouad.jtb.core.beans.Message), not marked as ignorable (39 known properties: "entities", "new_chat_member", "edit_date", "animation", "new_chat_photo", "new_chat_participant", "forward_from_message_id", "forward_from_chat", "audio", "chat", "document", "reply_markup", "delete_chat_photo", "contact", "migrate_from_chat_id", "forward_from", "caption", "forward_date", "left_chat_member", "from", "text", "date", "venue", "new_chat_title", "new_chat_members", "game", "location", "reply_to_message", "video", "supergroup_chat_created", "channel_chat_created", "group_chat_created", "left_chat_participant", "message_id", "pinned_message", "migrate_to_chat_id", "sticker", "photo", "voice"])
at [Source: (String)"{"ok":true,"result":{"message_id":35,"sender_chat":{"id":-100XXXXXXXXXX,"title":"CHATPRUEBAS","type":"channel"},"chat":{"id":-100XXXXXXXXXX,"title":"CHATPRUEBAS","type":"channel"},"date":1619636945,"document":{"file_name":"COMPRA.zip","mime_type":"application/zip","file_id":"BQACAgQAAx0EVTYbywADI2CJstH4en_s-DBS628NYKPisTQtAALwCwACTOJQUCXhRHreYg0ZHwQ","file_unique_id":"AgAD8AsAAkziUFA","file_size":48250}}}
"; line: 1, column: 53] (through reference chain: io.fouad.jtb.core.beans.TelegramResult["result"]->io.fouad.jtb.core.beans.Message["sender_chat"])
at com.fasterxml.jackson.databind.DeserializationContext.handleUnknownProperty(DeserializationContext.java:823)
at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1153)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1589)

¿Alguien me puede ayudar?. Gracias.
 
Top