ApplicationCommandOptionType: DATETIME #3861
Answered
by
advaith1
i0bs
asked this question in
API Feature Requests & Ideas
Replies: 1 comment 1 reply
-
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
i0bs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
ApplicationComamndOptionType: DATETIME
This is something that I've been wanting to see for a while now, because I see so many practical uses. Let me firstly get the case of uses that I can currently think of:
What is this?
The
DATETIME
option type for application commands would enable bot developers to give users the ability of specifying either a data and time, or a time "window" with a given range. This could be used for numerous situations, including probably more than I was able to think of. The addition of this option, to me, I feel would be extremely beneficiary because of the incessant need some users have with things like trying to either plan an event ahead of time on Discord (and don't necessarily want to use built-in features) or need to search for something within a given time window.What would the data look like?
Having a new option type for application commands,
DATETIME
would be very nice to set of the two or both: a time range where it returns an array of 2 ISO8601 values, e.g.:Or it would be able to return a singular ISO8601 value for a specific date (and time), e.g.:
I believe that ISO8601 for this would be great as it follows with most of the given returned time stamps in the API's schema for fields giving that, i.e. messages sent, joined/creation account times and etc.
How will a bot developer code it?
Since the Discord Web API works off of serialized JSON data, we can use the already given schema with how ApplicationCommandOption is registered in an HTTP request for creating or updating an application command.
(
11
is a pseudo-given type for the option as an example.)How would this look?
I believe that already adopting the given calendar system we have for searching up messages would make it easy and more intuitive with users trying to use this in a bot's suite of commands. Please note that this example I am giving does not consider the new "editable pills" design that Mason has mentioned as of the Discord Developers Stage event.
(My photoshop skills are bad I'm sorry)
Credits to LordOfPolls#1010 for the bot shown in this screenshot.

Beta Was this translation helpful? Give feedback.
All reactions