Closed xtaran closed 5 years ago
Ok, it's these lines because the given file does not exist:
# send them a picture as well
my $image = Telegram::Bot::Object::PhotoSize->new(image => "smile.png");
$self->send_to_chat_id($msg->chat->id, $image);
Commenting them out makes the bot work as expected.
So I see several more or less minor issues here:
Telegram::Bot::Object::PhotoSize->new()
or similar.Thanks @xtaran - I will look at hardening against things like this (which we should notice before we send to the API, definitely.
Note that generally speaking one should not expect a code example from a SYNOPSIS to necessarily be complete and self-contained.
I just tried the example code from the Telegram::Bot POD and upon the first
/hello
the program spew out these messages:After that the bot no more answers any
/hello
requests anymore until I restart it. From reading the code I'd guess it should reply every time I say/hello
to it.I'm using Mojolicious 7.21 from Debian 9 Stretch and Telegram::Bot 0.010 from CPAN.