bot
bot copied to clipboard
Support more time formats for `!remind`
Sir Lancebot's .epoch
command is quite nice with it's support for different timeformats such as "in 3 hours" or "in 1 week". It's support for specific datetimes with TZ offsets is handy as well, when I want to have a reminder arrive at a specific time in my timezone.
I think it would be beneficial to see similar time formats supported in our !remind
command (because remembering M
vs m
is always quite annoying, and I don't think I'll ever remember it correctly on first go).
Seems like a good idea. I'd like to hear a proposed implementation from whoever wants to take this on before approving it though.
Mostly since this isn't a trivial change, so I don't want someone to invest a decent chunk of time in something that we would end up asking them to change.
support for specific datetimes with TZ offsets @janine9vn
This is already planned as part of #1924 (which is currently stalled by the modpings PR).
support for different timeformats such as "in 3 hours" or "in 1 week". @janine9vn
I can probably implement this as an extension to #1924 since it's of a similar vein.
I'd like to hear a proposed implementation from whoever wants to take this on before approving it @ChrisLovering
In terms of implementation for the relative time, we can probably just copy the relevant parts of the epoch command (which seems to be the DateString
converter)
As for the implementation of different end-time formats my current route is regex and then parsing relevant sections, since that's tidier than a bunch of try/except
for the different formats.
My request is that it supports parsing text using singular units of time: "in 1 hour" and "in 1 week." Currently Sir Lancebot's .epoch
command does not support this.
My request is that it supports parsing text using singular units of time: "in 1 hour" and "in 1 week." Currently Sir Lancebot's
.epoch
command does not support this.
This seems to be a limitation of arrow.Arrow.dehumanize()
. It doesn't support things like "in 1 hour"
, but it does support the proper english equivalent, i.e. "in an hour"
, "in a week"
, etc.
Not sure if this issue is still active since it has already been a year :D
What do you think about creating a "/remind" command for reminder? It could have day, month, hour etc. as optional parameters that you can enter. That would make it easier to not get confused with the proper format. However, I am not sure if that makes things actually easier and nicer to use.