grace-by-dev / grace-by-telegram-bots

Apache License 2.0
1 stars 1 forks source link

Refactor main.py of step of faith bot #12

Open nick-konovalchuk opened 2 weeks ago

nick-konovalchuk commented 2 weeks ago
  1. Replace user_utils.select_username_from_text with plain message.text.split()[1]
  2. Merge nested if statements like here
  3. Remove word "function" from all function names in the file. function_counselor_n are to be named schedule_counselor_appointment_n
  4. Replace schedule_counselor_appointment_n with a single function that accepts counselor id as an argument
  5. See if you can put functions directly to callback_data instead of this if-else function here. You can use functools.partial for functions that require some arguments to be fixed like schedule_counselor_appointment