Commit graph

137 commits

Author SHA1 Message Date
mykola2312
2ae4708438 disable filter because it actually suppresses all errors, not just timeout errors 2024-03-02 04:55:11 +02:00
mykola2312
7fac64f8e4 introduce db pool type instead of hard-coded SqlitePool 2024-03-02 03:07:12 +02:00
mykola2312
1e6d671feb rearrange file structure for bot commands 2024-03-02 02:53:54 +02:00
mykola2312
bb6687ac46 implement db structures for mapping 2024-03-02 02:22:31 +02:00
mykola2312
dd6f8a4f0e remove cmd db test 2024-03-02 02:18:02 +02:00
mykola2312
b70bdde318 rearrange mod file structure 2024-03-02 02:10:11 +02:00
mykola2312
e8245413ab begin messing around with sqlx 2024-03-02 01:50:30 +02:00
mykola2312
83b4488e8a make logger output dbg! in debug build 2024-03-02 01:50:21 +02:00
mykola2312
da057a0040 add reminder to add initiated dialogs into table 2024-03-02 00:27:46 +02:00
mykola2312
626272eea6 add sqlx migration script 2024-03-01 02:02:09 +02:00
mykola2312
e53a03ca1c update sql 2024-03-01 01:44:15 +02:00
mykola2312
75fc962c9a make first migration to implement database 2024-03-01 01:17:48 +02:00
mykola2312
c393cec924 improve docker configs 2024-02-29 20:41:00 +02:00
mykola2312
754397604b instead of file logging we're going to use stdout because bot will be run in container, therefore container output is a log 2024-02-29 20:20:06 +02:00
mykola2312
3ecbbd4ad2 use db and log paths as target/debug for debug run 2024-02-29 17:51:11 +02:00
mykola2312
80fcc9d5b6 introduce sqlx migrations 2024-02-29 16:23:15 +02:00
mykola2312
ee79869327 fix unused 2024-02-28 18:03:38 +02:00
mykola2312
9b0dc8fcd7 don't output ansi colors to log file 2024-02-27 01:40:27 +02:00
mykola2312
d5b5d156b7 make a layer filter to to prevent polling timeout errors from clogging logs 2024-02-27 01:13:43 +02:00
mykola2312
ed7c493b64 introduce logging to important functions 2024-02-26 22:46:08 +02:00
mykola2312
2424f4de77 make spawn function accept slice of &str instead of generics so joining into string for logging is easy 2024-02-26 22:12:47 +02:00
mykola2312
ca61b91058 make proper logging to file as well as writing errors to stderr. ditch idea with non_blocking because that's not async thing 2024-02-26 21:42:10 +02:00
mykola2312
beeca159be file logging seems to work except non-blocking 2024-02-26 20:32:19 +02:00
mykola2312
c17e334c24 implement tracing logging 2024-02-26 19:22:24 +02:00
mykola2312
3a5624facb accidentally pushed db file bruh 2024-02-26 00:53:39 +02:00
mykola2312
fa3eb811d8 make SqlitePool a dptree dependency, so handlers would have access to database 2024-02-26 00:42:28 +02:00
mykola2312
b3900a83e3 begin embedding sqlx into teloxide handlers 2024-02-25 23:44:05 +02:00
mykola2312
999cba08b6 add sqlx crate 2024-02-25 22:43:29 +02:00
mykola2312
2c45e4fa44 move generic bot download function to its own function to avoid code duplication 2024-02-24 15:23:57 +02:00
mykola2312
9420ad681b write function to parse url via url crate 2024-02-24 15:20:38 +02:00
mykola2312
475afbc7ce add warning to spawn function 2024-02-24 14:55:37 +02:00
mykola2312
a98e079669 add testing for url extraction 2024-02-24 14:47:57 +02:00
mykola2312
df1d3fc05b write function to find all urls in text 2024-02-24 14:32:08 +02:00
mykola2312
f72e31ab15 add new dependencies to dockerfile, fix broken copy layers 2024-02-21 22:39:24 +02:00
mykola2312
cac2a020bc there is vulnerability related to argument injection 2024-02-21 22:38:24 +02:00
mykola2312
c737ecd1ba remove message log spam 2024-02-21 21:39:41 +02:00
mykola2312
22d1011c9e clean main 2024-02-21 21:04:43 +02:00
mykola2312
72a7eb0239 implement bot command to download video 2024-02-21 21:04:21 +02:00
mykola2312
7fb721496a delete tmp file if error happens 2024-02-21 20:28:31 +02:00
mykola2312
fed938d04e finish implementing download function 2024-02-21 19:27:01 +02:00
mykola2312
69193d9f94 use result for better error handling dx 2024-02-21 19:25:15 +02:00
mykola2312
02265981d8 implementing some downloady stuff 2024-02-21 19:19:54 +02:00
mykola2312
4bc93de87e implement yt-dlp download 2024-02-21 19:06:23 +02:00
mykola2312
819e30c1fa begin implementing generic download function 2024-02-21 18:48:03 +02:00
mykola2312
ed013fae4d do renaming for command handlers so it wouldn't conflict with other functions 2024-02-21 18:42:09 +02:00
mykola2312
da07633d0d add -y option to ffmpeg so it wont stuck prompting for confirmation 2024-02-21 17:21:27 +02:00
mykola2312
e26814e2e7 add tests to check best format finding functions 2024-02-21 15:05:18 +02:00
mykola2312
a8a0831a52 move everything related to telegram bot to appropriate module 2024-02-21 14:52:54 +02:00
mykola2312
550c27ff03 mp3 converting with ffmpeg works 2024-02-21 14:35:07 +02:00
mykola2312
c8f9972941 introduce unit testing 2024-02-21 14:17:21 +02:00