Closed disha-2401 closed 3 years ago
When we discussed this earlier the idea was to have one command and then you return set of buttons with daily and weekly limit options. This is because lets say tomorrow we want to have monthly limit, fortnightly limit, do we go on creating new commands? I think a better approach is to have just one command and return a set of buttons ("Set Daily Limit", "Set Weekly Limit", "Set Monthly Limit", "Set 15 day limit") and so on depending on what options we have in the backend for each clubs.
@disha-2401 good that you are putting thoughts on how to achieve a scenario best, when you think also think about changes which can happen to a scenario in future and if our solution is robust enough to solve those.
When we discussed this earlier the idea was to have one command and then you return a set of buttons with daily and weekly limit options. This is because lets say tomorrow we want to have monthly limit, fortnightly limit, do we go on creating new commands? I think a better approach is to have just one command and return a set of buttons ("Set Daily Limit", "Set Weekly Limit", "Set Monthly Limit", "Set 15 day limit") and so on depending on what options we have in the backend for each clubs.
to display the keyboard , first, we need to generate keyboardmarkup and for that we some base array of which elements in buttons, so should I just create an array in application configuration and display buttons based on the number of elements in that array
yes for now put it in app config but later we will get these things from the database
according to API documentation, we can get and set daily limits as well as weekly limits. right now we have two commands, one is "/set_limit" and the other is "/remaining_limit", but I think we should create separate commands for daily and weekly data. For example, as we create two commands to set limit, such as "/set_daily_limit" and "/set_weekly_limit" and same applies to "/remaining_limit"