Dankoy / jforwarder

Telegram bot for coub.com communities, tags and channels subscriptions.
https://t.me/coub_forwarder_bot
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

feat: Added bot user friendly messages and exceptions checks #75

Closed Dankoy closed 9 months ago

Dankoy commented 9 months ago

Description

  1. 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
  1. 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
  1. 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

How Has This Been Tested?

Test Configuration:

Checklist: