use std::fmt::Debug;
use std::ops::Deref;
use async_trait::async_trait;
use reqwest::Response;
use crate::core::base_structs::ResponderBase;
use crate::core::subtypes::SentMessage;
use crate::core::voiceflow::VoiceflowBlock;
use crate::errors::VoiceflousionResult;
#[async_trait]
pub trait Responder: Deref<Target=ResponderBase> + Sized + Send + Sync + Debug{
async fn from_response(response: Response, content: VoiceflowBlock) -> VoiceflousionResult<Self>;
fn create_sent_message(&self) -> SentMessage {
SentMessage::new(self.message_content().clone(), self.message_id().clone(), self.date())
}
}