Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add discord messaging timestamps #385

Merged
merged 6 commits into from
Sep 10, 2021
Merged

Add discord messaging timestamps #385

merged 6 commits into from
Sep 10, 2021

Conversation

warriorzz
Copy link
Contributor

common/src/main/kotlin/DiscordTimestamp.kt Outdated Show resolved Hide resolved
common/src/main/kotlin/DiscordTimestamp.kt Outdated Show resolved Hide resolved
common/src/main/kotlin/DiscordTimestamp.kt Outdated Show resolved Hide resolved
Co-Authored-By: Lukellmann <[email protected]>
@BartArys
Copy link
Contributor

BartArys commented Sep 3, 2021

What do we gain from introducing a DiscordTimestamp? Its sole reason for existence seems to be to convert it to a String. Why not just make it a String directly instead?

The entire lib uses kx's Instant for time already, it seems more prudent to introduce a toMessageFormat (or whatever you want to call it) extension that accepts your DiscordTimestampStyle to those types directly instead, and save the hassle of using an adapter type.

@warriorzz
Copy link
Contributor Author

I didn't thought about that, but sounds good to me

@HopeBaron HopeBaron merged commit 5a6c5d6 into kordlib:0.8.x Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants