Change type

This commit is contained in:
Desiders 2024-01-15 18:22:21 +03:00
parent d7f530bd6b
commit bcaecd1585

View file

@ -1,6 +1,6 @@
use serde::{Deserialize, Serialize};
use crate::types::{InlineKeyboardMarkup, InputMessageContent, MessageEntity, ParseMode};
use crate::types::{InlineKeyboardMarkup, InputMessageContent, MessageEntity, ParseMode, Seconds};
/// Represents a link to an MP3 audio file. By default, this audio file will be
/// sent by the user.
@ -40,7 +40,7 @@ pub struct InlineQueryResultAudio {
pub performer: Option<String>,
/// Audio duration in seconds.
pub audio_duration: Option<String>,
pub audio_duration: Option<Seconds>,
/// [Inline keyboard] attached to the message.
///
@ -123,10 +123,7 @@ impl InlineQueryResultAudio {
self
}
pub fn audio_duration<S>(mut self, val: S) -> Self
where
S: Into<String>,
{
pub fn audio_duration(mut self, val: Seconds) -> Self {
self.audio_duration = Some(val.into());
self
}