eleksir
8665a6ddda
Refactor some parts of bot
...
- Move most modules to subdirs
- Rename functions according perlcritic guidelines
- Fix and add some bugs
2021-04-22 17:36:50 +03:00
eleksir
729489236f
move admin to CHI
2021-04-07 13:43:34 +03:00
eleksir
cec3ed66fb
Introduce cachedir config pragma, move karma to CHI
...
* Move karma from homebrew storage to CHI
* Use cachedir for CHI file storage heap
* Use cachedir in drink.pm
* Use cachedir in weather.pm
2021-04-07 13:39:04 +03:00
eleksir
57dee8b168
Replace HTTP::Tiny with Mojo::UserAgent and Mojo::UserAgent::Cached
2021-04-05 12:10:31 +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
c6ce5b1421
Perlcritic and similar fixes, no functional changes
2021-03-27 10:35:04 +03:00
eleksir
36208a35d5
botlib.pm: Add use monkeyuser to fix it
2021-03-22 13:48:47 +03:00
eleksir
23471ee185
Implement !drink and !праздник commands
2021-03-14 17:45:35 +03:00
eleksir
2af166e3e6
Implement !monkeyuser command
2021-03-10 12:59:51 +03:00
eleksir
6735d6217a
Implement !buni command
2021-03-09 15:52:48 +03:00
eleksir
3eb3e2126d
Implement !xkcd command
2021-03-08 16:22:39 +03:00
eleksir
c58a571da5
flickr.pm: handle error, more safe work with db
...
* Untie %secret explicitly to prevent possible data corruption
* Handle case when verifier is in config but request token absent in db
2021-03-07 21:38:34 +03:00
eleksir
efea02972c
Move away imgur client to imgur.pm, make typing notification before do web api queries, update gitignore
2021-03-07 21:17:24 +03:00
eleksir
d55d35f877
Implement !owl and !сова commands and improve !rabbit and co commands
2021-03-07 15:51:40 +03:00
eleksir
c8a766881e
flickr.pm: Implement flickr.com searching api
2021-03-07 14:34:16 +03:00
eleksir
f669186787
image.pm: use large thumbnail instead of real photo in imgur plugin
2021-03-02 01:36:54 +03:00
eleksir
1991edc803
botlib.pm: forgot that rabbit() should be explicitly imported
2021-03-01 02:39:00 +03:00
eleksir
5d14f08084
Implement (beta-quality) !rabbit, !bunny, !кролик commands and imgur api client for them
2021-03-01 02:10:58 +03:00
eleksir
dd67f33ec5
Merge fox and kitty plugins to image.pm, add oboobs, obutts command family, extend/fix admin.pm
...
* Merge fox and kitty plugins to image.pm
* Add !tits, !tities, !boobs, !boobies, !сиси, !сисечки commands
* Add !butt, !booty, !ass, !попа, !попка commands
* Add generic interface for plugin toggle flags
* Fix a bit morning fortune status plugin
2021-02-25 22:54:04 +03:00
eleksir
f4651ff915
Add !fox and !лис commands
2021-02-24 00:24:33 +03:00
eleksir
9fc11c7cf4
Admin censor: voice messages are special
2021-02-23 20:07:16 +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
e38726a1f2
Move admin commands to dedicated module, allow use admin stuff only to admins of chat
2021-02-23 14:02:56 +03:00
eleksir
79004942bd
Teapot lib: document canTalk() function
2021-02-22 23:49:42 +03:00
eleksir
52724accee
Teapot lib: Implement ability to delete message in chat
2021-02-22 23:45:37 +03:00
eleksir
4bdaea0a42
Do not answer back if someone quote our new member greet
2021-02-11 20:34:22 +03:00
eleksir
041ab3efeb
Fix fortune src filename check and another pack of style and natural language fixes
2021-02-09 00:57:08 +03:00
eleksir
5d0fe793fd
fisher.pm: there can be not just water
2021-02-08 13:46:13 +03:00
eleksir
4616470584
Fix 2 more typos - assign last name when it exist
2021-02-07 21:30:39 +03:00
eleksir
9732e71775
Define really empty array for newcomers
...
* Array for new member was defined with 1 empty value, but it must be empty array
* For more than 1 member added, last member should be enumerated via "и", not ","
2021-02-07 20:56:54 +03:00
eleksir
626feed7db
Use markdown + quote for fortune, use irand() instead of int (rand())
2021-02-07 18:37:30 +03:00
eleksir
f043fe5d78
Fix three typos since last commit
2021-02-07 14:08:29 +03:00
eleksir
054809ad3e
telegrambot.pm: correctly handle new_chat_member event
...
* Extract newcommers from new_chat_members array, not from from-field
2021-02-07 13:53:30 +03:00
eleksir
35148838f9
Add commands !fish !fishing !рыба !рыбалка !рыбка, tweak archeologist.pm
...
* Rearrange .gitignore
+ Add fisher.pm with fishing commands
* Max probability in archeologist.pm should not exceed 100%
2021-02-07 13:51:55 +03:00
eleksir
a1d238949f
Refactor code
...
* move plugins out of botlib.pm
* use make_path instead of mkpath
* squash some bugs
* update .gitignore
* use more correct randomizer, rather than perl own rand()
* coding style fixes
2021-02-06 19:06:59 +03:00
eleksir
8a521d3f3b
Use bot name from api instead of config value
...
* Use API for bot username and full name
* Return if unable to getMe()
* Return if unable to get chat_id
* Drop handling non-text msgs, they never was implemented
2021-01-05 10:55:01 +03:00
eleksir
d32a25f93b
Extend MOTD intro phrase list
2021-01-05 00:22:39 +03:00
eleksir
94f37408d7
InlineKeyboardButton: remove doubling field
2021-01-04 18:15:08 +03:00
eleksir
a108ebd701
archeologist.pm: tweak a bit probabilities
2020-12-26 17:54:45 +03:00
eleksir
f58046599c
Expand list of archeological findings thanks to @ArtemisFaul
2020-12-26 17:46:40 +03:00
eleksir
380bff679e
Add google_place_id and google_place_type fields to Venue object
2020-12-22 01:32:50 +03:00
eleksir
7d3d17f807
Add small_file_unique_id and big_file_unique_id fields to ChatPhoto object
2020-12-22 01:30:15 +03:00
eleksir
a9c049da13
Add horizontal_accuracy, live_period, heading, proximity_alert_radius, to Location object
2020-12-22 01:26:39 +03:00
eleksir
ade7cefe5a
ChatMember.pm: Add is_anonymous field, rename until -> until_date
2020-12-22 01:22:11 +03:00
eleksir
6d7830024c
Update Poll object fields
2020-12-22 01:13:06 +03:00
eleksir
33616284ca
Add PollAnswer object
2020-12-22 01:12:38 +03:00
eleksir
d8728b383e
Chat.pm: add linked_chat_id and location fields
2020-12-22 00:46:32 +03:00
eleksir
59e8fa525a
Add ChatLocation object
2020-12-22 00:45:39 +03:00
eleksir
afe50154ab
Base.pm: perlcritic fixes
2020-12-21 23:59:08 +03:00
eleksir
252bb86eb8
Add fields sender_chat, dice and proximity_alert_triggered to Message.pm
...
+ Add fields sender_chat, dice and proximity_alert_triggered
* Re-arrange fields list in online-docs' order
* perlcritic fixes
2020-12-21 23:55:15 +03:00