Use CountryCode instead of String in Giveaway struct

This commit is contained in:
Andrey Brusnik 2024-07-30 17:30:16 +04:00
parent 4870338a75
commit 25666a301c
No known key found for this signature in database
GPG key ID: D33232F28CFF442C

View file

@ -1,7 +1,7 @@
use chrono::{DateTime, Utc}; use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use crate::types::Chat; use crate::types::{Chat, CountryCode};
/// This object represents a message about a scheduled giveaway. /// This object represents a message about a scheduled giveaway.
#[serde_with::skip_serializing_none] #[serde_with::skip_serializing_none]
@ -37,7 +37,7 @@ pub struct Giveaway {
/// empty, then all users can participate in the giveaway. Users with a /// empty, then all users can participate in the giveaway. Users with a
/// phone number that was bought on Fragment can always participate in /// phone number that was bought on Fragment can always participate in
/// giveaways. /// giveaways.
pub country_codes: Option<Vec<String>>, pub country_codes: Option<Vec<CountryCode>>,
/// The number of months the Telegram Premium subscription won from the /// The number of months the Telegram Premium subscription won from the
/// giveaway will be active for /// giveaway will be active for