use std::fmt;
use super::ArgumentConvert;
use crate::{model::prelude::*, prelude::*};
#[non_exhaustive]
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
pub enum PLACEHOLDERParseError {
}
impl std::error::Error for PLACEHOLDERParseError {}
impl fmt::Display for PLACEHOLDERParseError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
}
}
}
#[async_trait::async_trait]
impl ArgumentConvert for PLACEHOLDER {
type Err = PLACEHOLDERParseError;
async fn convert(
ctx: impl CacheHttp,
guild_id: Option<GuildId>,
_channel_id: Option<ChannelId>,
s: &str,
) -> Result<Self, Self::Err> {
let lookup_by_PLACEHOLDER = || PLACEHOLDER;
lookup_by_PLACEHOLDER()
.or_else(lookup_by_PLACEHOLDER)
.or_else(lookup_by_PLACEHOLDER)
.cloned()
.ok_or(PLACEHOLDERParseError::NotFoundOrMalformed)
}
}