30 releases (17 breaking)

Uses new Rust 2024

0.17.0 Nov 8, 2025
0.16.0 Jan 12, 2025
0.16.0-rc.1 Feb 21, 2024
0.15.3 Sep 10, 2023
0.2.0 Oct 30, 2020

#288 in Text processing

Download history 12/week @ 2025-11-20 36/week @ 2025-11-27 42/week @ 2025-12-04 5/week @ 2025-12-11 27/week @ 2025-12-18 30/week @ 2025-12-25 36/week @ 2026-01-01 57/week @ 2026-01-08 16/week @ 2026-01-15 22/week @ 2026-01-22 13/week @ 2026-01-29 41/week @ 2026-02-05 27/week @ 2026-02-12 52/week @ 2026-02-19 127/week @ 2026-02-26 14/week @ 2026-03-05

223 downloads per month
Used in twilight

ISC license

1.5MB
36K SLoC

twilight-mention

codecov badge discord badge github badge license badge rust badge

twilight-mention is a utility crate for the Discord twilight-rs ecosystem to mention its model types and parse those mentions.

With this library, you can create mentions for various types, such as users, emojis, roles, members, or channels.

Examples

Create a mention formatter for a user ID, and then format it in a message:

use twilight_mention::Mention;
use twilight_model::id::{marker::UserMarker, Id};

let user_id = Id::<UserMarker>::new(123);
let message = format!("Hey there, {}!", user_id.mention());

Dependencies

~1.4–2.2MB
~47K SLoC