From 621d19486d60dd0aecd267b6d18beb55431235c2 Mon Sep 17 00:00:00 2001 From: eleksir Date: Sat, 7 Nov 2020 18:08:04 +0300 Subject: [PATCH] Update README.md because of bundling Telegram::Bot with bot as Teapot::Bot --- README.md | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 8ae9b69..ead958c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,12 @@ It is based on Perl modules [Telegram::Bot][1] and [Hailo][2] as conversation generator. -Config located in **data/config.json**, sample config provided as +I have to fork [Telegram::Bot][1] and add some of new methods that are already +appear in [Telegram API][3], but author seems to abandon lib. Also i decide to +rename it to avoid collision in future, now it is Teapot::Bot and is bundled +with bot. When lib become mature enough, maybe i release it separately. + +Bot config located in **data/config.json**, sample config provided as **data/sample_config.json**. Bot can be run via **bin/aleesa-telegam-bot** and acts as daemon. @@ -27,25 +32,6 @@ bash bootstrap.sh and all libraries should be downloaded, built, tested and installed. -## N.B. - -If bot is unable to post to channel due to limited permissions, it will die. -It is possible to change this behavior by patching Telegram/Bot/Brain.pm: - -```diff ---- Brain.pm 2019-07-01 04:04:17.000000000 +0300 -+++ Brain.pm.new 2020-09-05 22:25:20.941373455 +0300 -@@ -237,8 +237,9 @@ - - my $res = $self->ua->post($url, form => $form_args)->result; - if ($res->is_success) { return $res->json->{result}; } -- elsif ($res->is_error) { die "Failed to post: " . $res->message; } -- else { die "Not sure what went wrong"; } -+ elsif ($res->is_error) { warn "Failed to post: " . $res->message; } -+ else { warn "Not sure what went wrong"; } -+ return ""; - } -``` - [1]: https://metacpan.org/pod/Telegram::Bot [2]: https://metacpan.org/pod/Hailo +[3]: https://core.telegram.org/bots/api \ No newline at end of file