feat(/add): time parsing, link uniqueness, admin-only #60
Reference in New Issue
Block a user
Delete Branch "fix/issue-45-add-command-update"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Updates
/addcommand per issue #45:Time Parsing: Parse time in
HH:MMformat after date/add Fix bug https://github.com/foo/bar april 15 14:30HH:MMand previous arg is a parsed date, treats as timeLink Uniqueness:
check_link_uniquenow returns conflicting bounty ID⛔ A bounty with this link already exists: #3Admin-Only:
cmd_addnow catchesPermissionError⛔ Only admins can add bounties.Changes
core/services.py:check_link_unique()returnsint | None(bounty ID or None)add_bounty()includes bounty ID in duplicate errorupdate_bounty()updated to use new return typeapps/telegram-bot/commands.py:_is_time_format()and_set_time_on_timestamp()helpersparse_args()to parse HH:MM time after datecmd_addcatches PermissionError and ValueErrorTesting
Fixes #45
lgtm
Pull request closed