Commit Graph

38 Commits

Author SHA1 Message Date
eleksir
f019b98b1f Add partial BotAPI v6.5 support 2023-04-16 16:31:12 +03:00
eleksir
ecf4f94dca Add general support for BotAPI v6.4 2023-04-16 16:03:38 +03:00
eleksir
d4d830715b Add comments fo couple of fields in banChatMember method 2023-01-14 20:50:02 +03:00
eleksir
5edf5a7e0c Fine tune GET polling requests timings, update Teapot lib pod-docs, bump Teapot lib version where missed last time 2023-01-07 16:56:56 +03:00
eleksir
1f3675de8f 2/5 Lift up error to caller in Teapot lib, introduce can_talk() in Brain.pm 2023-01-02 19:06:02 +03:00
eleksir
5411d6df7f Fix fetching error message 2022-12-15 02:21:17 +03:00
eleksir
f6a5a05e58 Disable chat in morning greet list if chat id is not found 2022-12-15 02:19:01 +03:00
eleksir
bd9f66930b In _post_request() try to catch error message as raw and return it to upper layer 2022-12-12 12:41:54 +03:00
eleksir
9618369a45 Add debug for api errors 2022-11-26 14:22:11 +03:00
eleksir
b4e6685213 Add support for Bot API 6.3 2022-11-06 22:08:02 +03:00
eleksir
f9658ac5e8 Actually add admin mute command 2022-10-09 02:06:54 +03:00
eleksir
216a139c18 Update Teapot lib to comply with api v5.6, v5.7, v6.0 2022-04-16 19:51:26 +03:00
eleksir
a9bb74b440 Perlcritic overhaul, apply to Teapot lib too 2022-02-12 17:50:23 +03:00
eleksir
8d35bb2452 Update api with fields from v5.4 and v5.5 2021-12-07 20:11:56 +03:00
eleksir
47e82449e7 Update present api implementation to botapi v5.3 2021-06-26 10:00:51 +03:00
eleksir
62650bd8ad Update to api 5.2 changes (no payments-2.0) 2021-04-30 23:42:54 +03:00
eleksir
8e2414288b Fix some errors of tg api v5.1 transition 2021-04-25 01:34:58 +03:00
eleksir
615213ee41 Merge branch 'master' into update_teapot_bot_lib_to_api_v5.1 2021-04-24 11:47:44 +03:00
eleksir
e7ef39366b Try not to die inside Mojo::Reactor::Poll if some incorrect data lands in update 2021-04-22 19:24:59 +03:00
eleksir
5d17018490 Update Teapot::Bot to v5.1 api data types, add some debug 2021-04-04 22:44:28 +03:00
eleksir
b8fb89358e Try not to die if tg api call timeouts or api returns garbage 2021-03-30 20:04:21 +03:00
eleksir
04cb3d2357 First run with admin module: fix typos in ChatMember.pm, Brain.pm, admin.pm, botlib.pm 2021-02-23 18:16:24 +03:00
eleksir
52724accee Teapot lib: Implement ability to delete message in chat 2021-02-22 23:45:37 +03:00
eleksir
07275c5b43 Re-run Mojo::Loop everytime it dies, not just once. 2020-12-19 22:01:08 +03:00
eleksir
97434d511b Make most of processing errors non-critical. 2020-11-11 23:12:55 +03:00
eleksir
05f8990f5e Fix sending local photos by ctaulien 2020-11-11 21:35:10 +03:00
eleksir
57120eb461 Bump ver in Teapot::Bot 0.021 -> 0.022 and clenup modules
- Remove Encode module from cpanfile and telegrambot.pm
+ Add Mojo::IOLoop, Mojo::UserAgent, IO::Socket::SSL
* Sort cpanfile
* Bump version Teapot::Bot 0.021 -> 0.022
* Add aleesa-telegram-bot.pid to .gitignore
2020-11-07 17:54:58 +03:00
eleksir
97eddd414d Lint Teapot::Bot with perlcritic
* Use List::Util' any instead of grep in Base.pm
* Use croak() in Base.pm
2020-10-31 13:49:37 +03:00
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
eleksir
f0b1ae9c43 Set default action to "typing" if not supplied in sendChatAction() 2020-10-30 16:14:28 +03:00
eleksir
29c1fa8d07 Breaking API changes (handle Mojo loop errors), fix sendMessage method broken in 033441c
* Use general method to handle Mojo loop unsuccessful operations
* Do not die if tg api returns error via Mojo loop, lift up error status to upper layer
* Die with confess only in case of Mojo loop does not returns either is_success or is_error set
* Handle incomming updates related to poll event
* Update inline POD in Brain.pm
* Fix overlooked die removal in sendMessage, now it is croak
2020-10-30 15:42:36 +03:00
eleksir
c1b6ca013d More safe actions in Brain.pm 2020-10-30 15:16:45 +03:00
eleksir
0576a1ea57 Implement getChat() with inline POD 2020-10-30 13:10:33 +03:00
eleksir
74e58db1b8 Implement getChatMember() with inline POD 2020-10-29 16:06:19 +03:00
eleksir
113a918010 Some more work on sendChatAction()
* Fix return value
* Add POD inline for this method
2020-10-29 15:53:31 +03:00
eleksir
45318757df Implement sendChatAction() 2020-10-28 18:19:29 +03:00
eleksir
033441c513 First touch to satisfy perlcritic 2020-10-28 18:18:09 +03:00
eleksir
f816840e14 Now Telegram::Bot is Teapot::Bot 2020-10-28 18:12:49 +03:00