Commit graph

47 commits

Author SHA1 Message Date
klux2
c98619a524 enabled log files (again)
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-10-02 19:15:47 +02:00
klux2
3b5044e536 replaced strip with regex replace
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-10-01 00:19:30 +02:00
Konrad
5a565237e6 catching another error ...
Signed-off-by: Konrad <klux2@hs-mittweida.de>
2019-09-27 21:32:48 +02:00
Konrad
14535ba228 replaced localised date string with babel module
Signed-off-by: Konrad <klux2@hs-mittweida.de>
2019-09-27 21:24:00 +02:00
Konrad
9255527662 bug fix: space needed before language parameter when ordering meal plan
Signed-off-by: Konrad <klux2@hs-mittweida.de>
2019-09-27 21:21:47 +02:00
Konrad
a751903eee caching only if some meals were found last time
Signed-off-by: Konrad <klux2@hs-mittweida.de>
2019-09-27 21:02:10 +02:00
Konrad
e9cac9429b made it possible to set language for each meal command
Signed-off-by: Konrad <klux2@hs-mittweida.de>
2019-09-27 20:55:11 +02:00
Konrad
83adbc9808 requiring user to start the bot to change the language now
Signed-off-by: Konrad <klux2@hs-mittweida.de>
2019-09-27 20:51:34 +02:00
Konrad
2fd4dab43f changed json format to exclude redundant information
Signed-off-by: Konrad <klux2@hs-mittweida.de>
2019-09-27 20:24:25 +02:00
Konrad
9e0622e985 don't edit message to remove inline keyboard anymore
Signed-off-by: Konrad <klux2@hs-mittweida.de>
2019-09-27 20:15:36 +02:00
Konrad
c7c2f271ec sending meals in the correct language
Signed-off-by: Konrad <klux2@hs-mittweida.de>
2019-09-27 20:05:26 +02:00
Konrad
0bb014efec updated json object hook to convert string keys back to ints
Signed-off-by: Konrad <klux2@hs-mittweida.de>
2019-09-27 20:04:29 +02:00
Konrad
4bf7266951 caching meals for 15 minutes 2019-09-27 19:59:19 +02:00
Konrad
99de5d26c0 made it possible to en-/decode enum values to/from json 2019-09-27 18:48:01 +02:00
Konrad
5c548e0aab updated info string 2019-09-27 18:47:00 +02:00
Konrad
86bcf2864f added possibility to change language 2019-09-27 18:43:56 +02:00
Konrad
19891b29a7 changed info command to help 2019-09-27 18:37:17 +02:00
Konrad
2f28bf2d05 added possibility to translate messages with the google 2019-09-26 16:25:25 +02:00
klux2
20e0025c26 replaced strip with rstrip to only remove ingredient numbers from end of string
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-07-08 10:23:33 +02:00
klux2
596dd035bf fixed TypeError when run with Python 3.5
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-07-04 14:29:32 +02:00
klux2
439ae9f17e replaced month/weekday array with localized string
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-07-04 14:08:32 +02:00
klux2
739017538d added seconds to timestamp
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-07-04 13:46:25 +02:00
klux2
9f92a7164e added date/time to message log
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-07-04 13:45:38 +02:00
klux2
cc6ebfdc2a adding newline character to message text to improve readability
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-07-04 13:43:19 +02:00
klux2
4946837240 caching bot id (web request is done only once)
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-07-04 13:37:04 +02:00
klux2
01248e449e added more details to error message
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-07-04 13:34:10 +02:00
klux2
1efc6bd383 added july to list of month
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-07-01 17:57:44 +02:00
klux2
3b424536ff enabling logging to file
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-06-25 11:09:14 +02:00
klux2
02e6a96e11 added possibility to send messages even with logging disabled
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-06-25 11:05:54 +02:00
klux2
0e9cc463c1 enabling/disabling logging with chat commands
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-06-25 11:05:51 +02:00
klux2
687dc8296b modified .gitignore to exclude test file
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-06-25 10:40:58 +02:00
klux2
a4b42c945c checking for keys in msg dictionary
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-06-25 10:39:05 +02:00
klux2
84ba13f77c remove config files
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-06-25 10:18:40 +02:00
klux2
5662dcfe8c cleanup old files
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-06-25 10:15:59 +02:00
klux2
4f0cc4106c bug fix: made send_message function coroutine
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-05-12 22:00:10 +02:00
klux2
53c742035b added type hints for function parameters and return values
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-05-12 21:54:25 +02:00
klux2
d2989e4857 updated documentation for send_message
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-05-12 15:16:13 +02:00
klux2
976a4b9e3a added config for devel bot
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-05-12 15:10:58 +02:00
klux2
0cc781ac4e added sendMessage function checking if the bot was blocked and removing the id from the chat list if it was
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-05-12 15:09:29 +02:00
klux2
8e04e905e6 replaced string replace with format string
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-05-08 18:39:50 +02:00
klux2
d54be95d88 formatting food as monospace to it can be copied easily
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-05-08 18:37:32 +02:00
klux2
a3ce417523 made function static, initialized datum variable
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-05-08 18:35:18 +02:00
klux2
3ea6070d5c added hyperlink for link
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-05-08 18:34:44 +02:00
klux2
5b2fd914a4 added link for bot profile picture
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-04-08 17:16:01 +02:00
klux2
b6fef40174 bug fix: daily message was sent on every day
If the mensa is closed (e. g. weekends), this message shouldn't be send. After b56bdf9382, the food for the next day was sent, even if this was monday

Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-03-23 11:38:26 +01:00
klux2
b56bdf9382 bot now sends plan for next lunch (after 14:00), not for current day
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-03-17 19:55:34 +01:00
klux2
b93b745cf0 initial commit
Signed-off-by: klux2 <k.lux.gm@gmail.com>
2019-03-17 18:48:05 +01:00