pub enum SendMessageParseMode {
MarkdownV2,
HTML,
}
pub struct SendMessageOption {
pub parse_mode: Option<SendMessageParseMode>,
}
#[derive(Debug, Clone, Copy)]
pub enum StatusCode {
Success = 0,
ErrorInternalError,
}
impl StatusCode {
pub fn as_u16(&self) -> u16 {
*self as u16
}
}
#[derive(Debug, serde::Serialize)]
pub struct RequestObj {
chat_id: String,
text: String,
#[serde(skip_serializing_if = "Option::is_none")]
parse_mode: Option<String>,
}
impl RequestObj {
pub fn new(chat_id: &str, text: &str, parse_mode: Option<String>) -> Self {
Self {
chat_id: chat_id.to_owned(),
text: text.to_owned(),
parse_mode,
}
}
}