1
Fork 0
mirror of https://github.com/Steffo99/patched-porobot.git synced 2024-12-22 17:44:22 +00:00

Properly display formats on Telegram and Discord

This commit is contained in:
Steffo 2023-04-12 00:35:58 +02:00
parent 40d040f28c
commit 9157e7ca26
Signed by: steffo
GPG key ID: 2A24051445686895
2 changed files with 7 additions and 4 deletions

View file

@ -228,10 +228,10 @@ impl EventHandler {
None => format!("```text\n{}\n```", deck.to_code(DeckCodeFormat::F1).expect("to be able to serialize the deck code")),
});
let (format, regions) = if let Some(regions) = deck.eternal(&engine.cards) {
let (format, regions) = if let Some(regions) = deck.standard(&engine.cards) {
("<:standard:1095374776492638208> Standard 4.3", regions)
} else if let Some(regions) = deck.eternal(&engine.cards) {
("<:eternal:1095374779130839151> Eternal", regions)
} else if let Some(regions) = deck.standard(&engine.cards) {
("<:standard:1095374776492638208> Standard", regions)
} else if let Some(regions) = deck.unlimited_champions(&engine.cards) {
("Unlimited Champions", regions)
} else if let Some(regions) = deck.singleton(&engine.cards) {

View file

@ -204,7 +204,10 @@ pub fn display_deck(index: &CardIndex, deck: &Deck, code: &str, name: &Option<&s
let mut tags: Vec<&'static str> = vec![];
let regions = if let Some(regions) = deck.eternal(index) {
let regions = if let Some(regions) = deck.standard(index) {
tags.push("#Standard_4_3");
regions
} else if let Some(regions) = deck.eternal(index) {
tags.push("#Eternal");
regions
} else if let Some(regions) = deck.unlimited_champions(index) {