Closed krose closed 2 years ago
Hi @krose, thanks for the question, did you try sending the image to a particular chat? Or sending the image from an URL (e.g. https://telegram.org/img/t_logo.png)? Just to make sure it is not an image issue
Hi @ebeneditos Thank you for the reply. It's much appriciated.
The code below - except for the plot part - is an excact snippet of some code that works with an active bot I have running on a Digital Ocean server that sends messages to the same group and it works fine. The code / call is basically the same, which is why I don't think there's anything wrong with the file.
flow_gassco_source_plot <- function(bot, update){
flow_gg <- <long-code-for-my-plot>
ggsave(filename = "~/plot.png", plot = flow_gg, device = "jpeg", dpi = 500, width = 30, height = 20, units = "cm")
tel_res <- bot$sendPhoto(chat_id = update$message$chat_id,
photo = "~/plot.png")
}
gieaggplot_handler <- CommandHandler("flowGasscoSource", flow_gassco_source_plot, username = bot$getMe()$username)
updater <- updater + gieaggplot_handler
Hi, I have not been able to replicate the problem, as when I do it the Bot sends the photo properly. Actually, there is a test just to check that (look line 45 on the Bot tests) that passes as expected. Given this, I believe this is not a problem from the package, so I will proceed to close the issue, sorry if I cannot provide more help.
Hi @ebeneditos ... thanks for all the work you have done on this package.
I have a problem that I'm not sure how to fix and hope that you might be able to help. I've been pushing messages to a group for a while without the bot listening. I can send text, but whenever I try to send a picture, then it doesn't work. Do you know if there is anything I can do to send pictures? The script below is basically a cron job running on a server I have, but the error reproduce both on Debian and Windows.
*Updated for typo.