Commit Graph

273 Commits

Author SHA1 Message Date
eleksir
9abb221dac Make bot more human-like by delaying answers
- Greet newcommers with notable randomized delay + send "typing", pretending we are real human :)
- Make 1-2 second delay in group chat before answer.
2020-10-10 14:17:25 +03:00
eleksir
0d0b8bb4c2 Add one more common phrase 2020-10-03 19:12:05 +03:00
eleksir
04706f20e2 Use user id in mention of newcommers when greet them 2020-09-27 14:49:32 +03:00
eleksir
1567fbe0db New logging, handle bot quote in groups, newcommer greets reworked
+ More sane and verbose logging
* Newcommer greet now should now mention newcommer
+ If someone in group quote bot's phrase, bot should answer
* Move some subs related to framework to telegramlib.pm
* Handle (log only for now) sent media - documents, stickers, photos in public chats (voice, audio, video still unhandled)
2020-09-26 21:36:37 +03:00
eleksir
376cbdfbe5 Add debug messages to some events 2020-09-21 02:13:20 +03:00
eleksir
f0d8e90441 Add date to logger() messages like in bsd syslog 2020-09-21 02:11:47 +03:00
eleksir
1822054f03 Fix fool typo that prevents daemon from start 2020-09-21 02:09:21 +03:00
eleksir
ab27431e83 Edit spelling and enhance README.md 2020-09-19 14:57:05 +03:00
eleksir
d53ee53ad8 Use Cwd::utf8 to cope with returning string ut8-ness
* Use Cwd::utf8
* Sort cpanfile require, remove duplicates, add Cwd::utf8
* Add check on first call of abs_path()
2020-09-19 14:48:29 +03:00
eleksir
9461042ec4 Use botlib own trim() 2020-09-19 14:43:48 +03:00
eleksir
04057e10e1 Paint help message in markdown 2020-09-12 14:02:41 +03:00
eleksir
476519efc8 More accurate detect permission to talk in group chats 2020-09-12 00:37:11 +03:00
eleksir
e7f0eaeceb Use relaxed json parser to allow comments in configs 2020-09-12 00:30:30 +03:00
eleksir
814a7ddb2b Create pid file in workdir if run directly from unpriv. user 2020-09-11 11:20:21 +03:00
eleksir
b11496a7b4 Enhance newcommer greet 2020-09-11 11:20:21 +03:00
eleksir
7cce6a9413 Deejay incomming phrase munging code 2020-09-11 11:20:21 +03:00
eleksir
7218c7d510 Require perl-5.18.0 to properly lc() and uc() unicode strings 2020-09-11 11:20:21 +03:00
eleksir
c8819676e7 Add more random phrases 2020-09-11 11:20:21 +03:00
eleksir
c3d2d76ad4 Add trim() and random pre-generated phrase answer
+ Add php-inspired trim() function
+ Add randomCommonPhrase() in order not to repeat given sentense if unable to produce relevant phrase from vocabulary generator
2020-09-11 11:20:21 +03:00
eleksir
20bbfab333 Add help, debug log, fix pid file creation
+ Add help in group chat
+ Add debug log ability
* A bit of cleanup
* Check against start uid rather than effective uid when creating pid-file
2020-09-11 11:20:21 +03:00
eleksir
f7ecdb870f Add pong and понг replies. 2020-09-11 11:20:21 +03:00
eleksir
9a86ebb5bd Actually check 2 letters on 1 letter command invocation. 2020-09-11 11:20:03 +03:00
eleksir
2bf710aeb7 Initial commit. Split bot from myapi as separate application. 2020-09-05 22:50:10 +03:00