mirror of
https://github.com/Steffo99/patched-porobot.git
synced 2025-01-03 15:34:18 +00:00
Add CardRegion::to_tag
This commit is contained in:
parent
75aab93b57
commit
115af23e4b
1 changed files with 24 additions and 0 deletions
|
@ -112,6 +112,30 @@ impl CardRegion {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Get the long code of this [`CardRegion`].
|
||||||
|
///
|
||||||
|
/// If the region has no short code, it will return [`None`].
|
||||||
|
///
|
||||||
|
/// Used for deck hashtags in the Telegram bot.
|
||||||
|
pub fn to_tag(&self) -> Option<&'static str> {
|
||||||
|
match self {
|
||||||
|
Self::Demacia => Some("Demacia"),
|
||||||
|
Self::Freljord => Some("Freljord"),
|
||||||
|
Self::Ionia => Some("Ionia"),
|
||||||
|
Self::Noxus => Some("Noxus"),
|
||||||
|
Self::PiltoverZaun => Some("PiltoverZaun"),
|
||||||
|
Self::ShadowIsles => Some("ShadowIsles"),
|
||||||
|
Self::Bilgewater => Some("Bilgewater"),
|
||||||
|
Self::Shurima => Some("Shurima"),
|
||||||
|
Self::Targon => Some("Targon"),
|
||||||
|
Self::BandleCity => Some("BandleCity"),
|
||||||
|
Self::Runeterra => Some("Runeterra"),
|
||||||
|
_ => None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Get the human friendly
|
||||||
|
|
||||||
/// Get the Discord emoji code associated with this [`CardRegion`].
|
/// Get the Discord emoji code associated with this [`CardRegion`].
|
||||||
pub fn discord_emoji(&self) -> &'static str {
|
pub fn discord_emoji(&self) -> &'static str {
|
||||||
match self {
|
match self {
|
||||||
|
|
Loading…
Reference in a new issue