use thiserror::Error;
use twilight_model::id::Id;
pub mod actions;
pub mod types;
#[derive(Debug, Error)]
pub enum TwilightError {
#[error("An error occurred while sending the message: {0}")]
Twilight(#[from] twilight_http::Error),
#[error("An error occurred while parsing the response from the Discord API: {0}")]
TwilightParsing(#[from] twilight_http::response::DeserializeBodyError),
}
pub trait IntoId<T> {
fn into_id(self) -> Id<T>;
}
impl<T> IntoId<T> for u64 {
fn into_id(self) -> Id<T> {
Id::new(self)
}
}
impl<T> IntoId<T> for Id<T> {
fn into_id(self) -> Id<T> {
self
}
}