mirror of
https://github.com/Steffo99/patched-porobot.git
synced 2024-12-22 17:44:22 +00:00
Add CardRarity::discord_emoji()
This commit is contained in:
parent
c8c389c0b1
commit
97899f3ca2
1 changed files with 12 additions and 0 deletions
|
@ -38,6 +38,18 @@ impl CardRarity {
|
|||
) -> Option<&'hm LocalizedCardRarity> {
|
||||
hm.get(self)
|
||||
}
|
||||
|
||||
/// Get the Discord emoji code associated with this [`CardRarity`].
|
||||
pub fn discord_emoji(&self) -> &'static str {
|
||||
match self {
|
||||
CardRarity::None => "",
|
||||
CardRarity::Common => "<:common:1056024315046412358>",
|
||||
CardRarity::Rare => "<:rare:1056022907433799690>",
|
||||
CardRarity::Epic => "<:epic:1056023004028608622>",
|
||||
CardRarity::Champion => "<:champion:1056024303856001034>",
|
||||
CardRarity::Unsupported => "",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
Loading…
Reference in a new issue