Closed zekroTJA closed 2 years ago
You could also use https://github.com/karrick/tparse like I did in one of my projects: https://github.com/lus/jacques/blob/main/internal/discord/reminder.go#L107
This package implements more advanced duration notations (you could actually provide 1d-1h
and would end up with a duration of 23 hours).
Yeah, thank you for the recommendation, but I already implemented something to handle it. ^^
Type
UI/UX Enhancement
Description
Currently, commands which take time spans as parameter should also be able to handle time formats like days
d
or weeksw
and should generally be less strictive as the default Go implementation.Attachments
Idea
This could be easily achieved using the following regex.