use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
pub struct BotCommand {
pub command: String,
pub description: String,
}
impl BotCommand {
pub fn new<S1, S2>(command: S1, description: S2) -> Self
where
S1: Into<String>,
S2: Into<String>,
{
Self { command: command.into(), description: description.into() }
}
pub fn command<S>(mut self, val: S) -> Self
where
S: Into<String>,
{
self.command = val.into();
self
}
pub fn description<S>(mut self, val: S) -> Self
where
S: Into<String>,
{
self.description = val.into();
self
}
}