eleksir a480786afa First run of Teapot::Bot fixes.
* Fix typos in Brain.pm
* Fix typos in User.pm
* Implement typing methods in Message object and make use of it
* Fix incorrect syntax of unless loops in telegrambot.pm
* Add Log::Any as it required by Teapot::Bot
* Do not use --update in bootstrap.sh
* Add data/lat to .gitignore
* Load ChatMember and ChatPermissions in Message object, so we can use 'em and avoid crash
* Supply missing $send_args to _post_request
2020-10-30 18:14:00 +03:00
2020-10-22 13:49:45 +03:00
2020-10-22 13:49:45 +03:00
2020-10-30 18:14:00 +03:00
2020-10-30 18:14:00 +03:00
2020-10-28 15:20:38 +03:00
2020-10-30 18:14:00 +03:00
2020-10-30 18:14:00 +03:00
2020-09-19 14:57:05 +03:00

Aleesa-Telegram-bot - Simple Telegram chatty bot

About

It is based on Perl modules Telegram::Bot and Hailo as conversation generator.

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.

Installation

In order to run this application, you need to "bootstrap" it - download and build all required dependencies and libraries.

You'll need "Development Tools" or similar group of packages, perl, perl-devel, perl-local-lib, perl-app-cpanm, sqlite-devel, zlib-devel, openssl-devel, libdb4-devel (Berkeley DB devel), make.

After installng required dependencies it is possible to run:

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:

--- 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 "";
 }
Description
No description provided
Readme 674 KiB
Languages
Perl 99.9%
Shell 0.1%