/edit: -field clearing + per-arg + admin-only #46

Closed
opened 2026-04-04 06:45:19 +02:00 by shoko · 0 comments
Owner

Objective

Update /edit command with per-argument updates, clear syntax, and admin permission.

Changes

Per-Argument Updates

  • Each argument (text, link, date, time) is optional
  • Only provided arguments are updated
  • Time parsing same as /add

Clear Syntax (- prefix)

  • /edit 1 -link - clear link only
  • /edit 1 -date - clear date only
  • /edit 1 -link -date - clear both
  • /edit 1 new text -link - update text, clear link
  • /edit 1 -link https://new.com - clear link, add new link
  • If updating link to a new value, check uniqueness
  • If duplicate found, reject with error

Admin-Only

  • Only admins can use /edit (changed from creator-only)

Updated Usage

/edit <id> [text] [link] [date] [time]
/edit <id> -link       (clear link)
/edit <id> -date       (clear date)
/edit <id> -link -date (clear both)
/edit <id> new text    (update text only)

Dependencies

  • #43 (service layer must be done first)
## Objective Update `/edit` command with per-argument updates, clear syntax, and admin permission. ## Changes ### Per-Argument Updates - Each argument (text, link, date, time) is optional - Only provided arguments are updated - Time parsing same as /add ### Clear Syntax (- prefix) - `/edit 1 -link` - clear link only - `/edit 1 -date` - clear date only - `/edit 1 -link -date` - clear both - `/edit 1 new text -link` - update text, clear link - `/edit 1 -link https://new.com` - clear link, add new link ### Link Uniqueness on Update - If updating link to a new value, check uniqueness - If duplicate found, reject with error ### Admin-Only - Only admins can use /edit (changed from creator-only) ### Updated Usage ``` /edit <id> [text] [link] [date] [time] /edit <id> -link (clear link) /edit <id> -date (clear date) /edit <id> -link -date (clear both) /edit <id> new text (update text only) ``` ## Dependencies - #43 (service layer must be done first)
shoko added this to the Phase 2 milestone 2026-04-04 06:45:19 +02:00
shoko added the telegram-botphase-2 labels 2026-04-04 06:45:19 +02:00
han was assigned by shoko 2026-04-04 06:45:19 +02:00
shoko closed this issue 2026-04-04 09:41:06 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/jigaido#46