Added template with user friendly examples and description for subscribe and unsubscribe commands. This message send to user if command validation was not successfull.
Expected full command "/{command} {subscription_type} {field1} {field2}"
For example:
/{command} community music daily
where:
community - is the type of subscription
music - the name of community
daily - community section
Link to subscription - https://coub.com/community/music
Or
/{command} tag music popular
where:
tag - is the type of subscription
music - the name of tag
popular - coub tag ordering
Link to subscription - https://coub.com/tags/music
To see available tag orders run /tag_orders command
To see available communities and its sections run /communities command
Full list of commands can be found in /help
Added validation checks for entity existance and throws user-friendly message if something went wrong.
For example. For command "/unsubscribe community music asd" but validate community and section. If community or section not found in db (not valid) then understandable message is sent to user along with freindly message how to subscribe or unsubscribe to something.
coub_forwarder_bot, [2/9/24 13:17]
Section with name 'asd' not found
coub_forwarder_bot, [2/9/24 13:17]
Expected full command "/subscribe {subscription_type} {field1} {field2}"
For example:
/subscribe community music daily
where:
community - is the type of subscription
music - the name of community
daily - community section
Link to subscription - https://coub.com/community/music
Or
/subscribe tag music popular
where:
tag - is the type of subscription
music - the name of tag
popular - coub tag ordering
Link to subscription - https://coub.com/tags/music
To see available tag orders run /tag_orders command
To see available communities and its sections run /communities command
Full list of commands can be found in /help
Updated community and sections template
Available communities:
1: animals-pets
2: blogging
3: standup-jokes
4: mashup
5: anime
6: movies
7: gaming
8: cartoons
9: art
10: live-pictures
11: music
12: sports
13: science-technology
14: food-kitchen
15: celebrity
16: nature-travel
17: fashion
18: dance
19: cars
20: memes
Available sections for each community:
1: monthly
2: quarter
3: daily
4: half
5: fresh
6: rising
7: weekly
Type of change
[x] New feature (non-breaking change which adds functionality)
How Has This Been Tested?
[x] Full integration test with subscribe, unsubscribe commands with text validation
Test Configuration:
Firmware version: MacOS 14
Hardware: Macbook M1 Pro
SDK: jdk-17.0.2
Checklist:
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
[x] I have updated project version if release is planned
Description
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: