Skip to content

Commit

Permalink
Use seconds instead of milliseconds, so it will show up the right way
Browse files Browse the repository at this point in the history
  • Loading branch information
warriorzz committed Sep 3, 2021
1 parent 1668eaf commit 06776cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/src/main/kotlin/DiscordTimestamp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package dev.kord.common
import kotlinx.datetime.Instant

fun Instant.toMessageFormat(style: DiscordTimestampStyle = DiscordTimestampStyle.ShortDateTime) =
"<t:${toEpochMilliseconds()}:${style.style}>"
"<t:${toEpochMilliseconds() / 1000}:${style.style}>"

/**
* The class representing the [style of a timestamp](https://discord.com/developers/docs/reference#message-formatting-timestamp-styles)
Expand Down

0 comments on commit 06776cd

Please sign in to comment.