pub async fn delete(&self, cache_http: impl CacheHttp) -> Result<Channel> {
        #[cfg(feature = "cache")]
        {
            if let Some(cache) = cache_http.cache() {
                let req = Permissions::MANAGE_CHANNELS;

                if !utils::user_has_perms(&cache, self.id, Some(self.guild_id), req).await? {
                    return Err(Error::Model(ModelError::InvalidPermissions(req)));
                }
            }
        }

        self.id.delete(&cache_http.http()).await
    }
/// Deletes this channel, returning the channel on a successful deletion.
///
/// **Note**: If the `cache`-feature is enabled permissions will be checked and upon
/// owning the required permissions the HTTP-request will be issued.
Deletes this channel, returning the channel on a successful deletion.
Note**: If the `cache`-feature is enabled permissions will be checked and upon
owning the required permissions the HTTP-request will be issued.
Deletes this channel returning the channel on a successful deletion . Note ** : If the ` cache ` - feature is enabled permissions will be checked and upon owning the required permissions the HTTP - request will be issued .
pub async fn delete(&self, cache_http: impl CacheHttp) -> Result<Channel> {
        #[cfg(feature = "cache")]
        {
            if let Some(cache) = cache_http.cache() {
                let req = Permissions::MANAGE_CHANNELS;
                if !utils::user_has_perms(&cache, self.id, Some(self.guild_id), req).await? {
                    return Err(Error::Model(ModelError::InvalidPermissions(req)));
                }
            }
        }
        self.id.delete(&cache_http.http()).await
    }
pub async fn delete ( & self , cache_http : impl CacheHttp ) -> Result < Channel > { # [ cfg ( feature " " ) ] { if let Some ( cache ) = cache_http . cache ( ) { let req = Permissions :: MANAGE_CHANNELS ; if ! utils :: user_has_perms ( & cache , self . id , Some ( self . guild_id ) , req ) . await ? { return Err ( Error :: Model ( ModelError :: InvalidPermissions ( req ) ) ) ; } } } self . id . delete ( & cache_http . http ( ) ) . await }
Deletes this channel, returning the channel on a successful deletion.
Deletes this channel returning the channel on a successful deletion .
&self
cache_http
impl CacheHttp