Skip to content

feat(mention)!: rename timestamp styles and add new styles - #2520

Open
lukadev-0 wants to merge 1 commit into
twilight-rs:nextfrom
lukadev-0:new-timestamp-styles
Open

feat(mention)!: rename timestamp styles and add new styles#2520
lukadev-0 wants to merge 1 commit into
twilight-rs:nextfrom
lukadev-0:new-timestamp-styles

Conversation

@lukadev-0

Copy link
Copy Markdown

Renames the existing TimestampStyles in the twilight-mention crate to better match the descriptions inside of the documentation. Also adds the ShortDateMediumTime (S) and ShortDateTime (s) variants.

The following variants have been renamed:

  • LongDateTime -> FullDateShortTime (F)
  • ShortDateTime -> LongDateShortTime (f)
  • LongTime -> MediumTime (T)

Also adds the non_exhaustive attribute in order to prevent having to introduce breaking changes when Discord adds new timestamp styles.

@github-actions github-actions Bot added c-mention Affects the mention crate m-breaking change Breaks the public API. t-feature Addition of a new feature labels Mar 8, 2026

@raventhyme raventhyme left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request. This was a confusing one to review but I think I got it all.

The Discord docs commit for this change is: discord/discord-api-docs@8e84442

Comment thread twilight-mention/src/timestamp.rs Outdated
Comment thread twilight-mention/src/timestamp.rs Outdated
Comment thread twilight-mention/src/timestamp.rs Outdated
Comment thread twilight-mention/src/timestamp.rs Outdated
Comment thread twilight-mention/src/timestamp.rs Outdated
@lukadev-0
lukadev-0 force-pushed the new-timestamp-styles branch from 25eb7f8 to 472b232 Compare July 12, 2026 14:04
@lukadev-0
lukadev-0 requested a review from raventhyme July 12, 2026 14:06

@raventhyme raventhyme left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for getting to this so quickly, sorry a review took so long. Everything looks resolved to me.

@raventhyme
raventhyme enabled auto-merge (squash) July 12, 2026 15:25
@raventhyme
raventhyme disabled auto-merge July 18, 2026 13:43
@AEnterprise

Copy link
Copy Markdown
Member

this is a breaking change, shouldn't we keep the old names for a bit as aliasses?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c-mention Affects the mention crate m-breaking change Breaks the public API. t-feature Addition of a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants