Closed FlorianSW closed 1 year ago
The issue you're describing is that it is tedious to retype the whole datetime when in reality you just want to be able to say how long the session should last. So you should have an option that says XX:XX hours later
. Instead using In XX:XX hours
would only really work if you create a new session right when you want it to start. So, relative to the start time, not the current time.
I wouldn't have any problem merging this if it was 100% clear to the user that these choices are merely suggestions, however I have my doubts that every user will understand that. That's not really a problem with your code, but rather with Discord's UI.
It would be much better if instead of suggesting a time relative to the current time, it would suggest a yet-to-be-resolved time relative to the start time. So the choice's value would be a certain string code such as duration:3600
. Then, when the command is ran and it notices the end time starts with duration:
, it splits at the :
and attempts to interpret the value afterwards as the timedelta in seconds.
Let me know if that's something you're up for, otherwise I'll do it myself some time later this week.
Hmm, good point. Yeah, I think this is not really great from discord's UI point of view. The only possible thing I can think of would be providing both options but optional. Not sure if that is any better, though :/ The thing with adding a special syntax (the one you proposed) would work as well (for me), however, there I have the feeling a lot of people will not really understand how to use it tbh :/
So you should have an option that says XX:XX hours later Oh yeah, good point. I, until now, always used "now" as a start_time, so my implementation of that might be biased :P
Do you really think that people will not get the suggestions thing afterall? Would it help to have a better description or something? Maybe having a fixed timestamp is not really needed at all? What would be the use case of that, even? :D I, for now, always calculated the end_time based on "I want to have it 1h later" :P
The thing with adding a special syntax (the one you proposed) would work as well (for me), however, there I have the feeling a lot of people will not really understand how to use it tbh :/
By adding Choices to the end_time parameter you can hide the syntax behind an easy to understand name. While you could still use the syntax directly, you could also just select one of those available choices that say X hours later
or something like that.
You mean like it is now just using something like "duration:..." as the value of suggestions, instead of the exact timestamp, right? I mean, that would be totally feasible and would serve what I would like to have without breaking much of the current feature.
Exactly. Just let me know whether you wanna do that or not.
Did it myself already :) Thanks for the contribution!
It bothered me, that I needed to provide a full timestamp in the
/session new
command on my own, while the usual use case is probably to record a whole game and maybe some other more or less same timeframes. Hence, this PR adds suggestions to the end_time parameter of the session new command for easier usage.