#![doc(html_root_url = "https://docs.rs/serenity/*")]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![warn(
unused,
rust_2018_idioms,
clippy::unwrap_used,
clippy::clone_on_ref_ptr,
clippy::non_ascii_literal,
clippy::fallible_impl_from,
clippy::let_underscore_must_use,
clippy::format_collect,
clippy::format_push_string,
clippy::pedantic
)]
#![allow(
// Allowed to avoid breaking changes.
clippy::module_name_repetitions,
clippy::struct_excessive_bools,
clippy::result_large_err,
clippy::unused_self,
// Allowed as they are too pedantic
clippy::cast_possible_truncation,
clippy::unreadable_literal,
clippy::cast_possible_wrap,
clippy::wildcard_imports,
clippy::cast_sign_loss,
clippy::too_many_lines,
clippy::doc_markdown,
clippy::cast_lossless,
clippy::redundant_closure_for_method_calls,
// Covered by other lints
clippy::missing_panics_doc, // clippy::unwrap_used
)]
#![cfg_attr(test, allow(clippy::unwrap_used))]
#![type_length_limit = "3294819"]
#[macro_use]
extern crate serde;
#[macro_use]
mod internal;
pub mod constants;
pub mod json;
pub mod model;
pub mod prelude;
#[cfg(feature = "builder")]
pub mod builder;
#[cfg(feature = "cache")]
pub mod cache;
#[cfg(feature = "client")]
pub mod client;
#[cfg(feature = "collector")]
pub mod collector;
#[cfg(feature = "framework")]
pub mod framework;
#[cfg(feature = "gateway")]
pub mod gateway;
#[cfg(feature = "http")]
pub mod http;
#[cfg(feature = "interactions_endpoint")]
pub mod interactions_endpoint;
#[cfg(feature = "utils")]
pub mod utils;
mod error;
pub use async_trait::async_trait;
pub use futures;
pub use futures::future::FutureExt;
#[cfg(feature = "standard_framework")]
#[doc(hidden)]
pub use static_assertions;
#[cfg(all(feature = "client", feature = "gateway"))]
pub use crate::client::Client;
pub use crate::error::{Error, Result};
#[cfg(feature = "absolute_ratelimits")]
compile_error!(
"The absolute_ratelimits feature has been removed.\n\
Configure absolute ratelimits via Ratelimiter::set_absolute_ratelimits.\n\
You can set the Ratelimiter of Http via HttpBuilder::ratelimiter."
);
pub mod all {
#[cfg(feature = "builder")]
#[doc(no_inline)]
pub use crate::builder::*;
#[cfg(feature = "cache")]
#[doc(no_inline)]
pub use crate::cache::*;
#[cfg(feature = "client")]
#[doc(no_inline)]
pub use crate::client::*;
#[cfg(feature = "collector")]
#[doc(no_inline)]
pub use crate::collector::*;
#[doc(no_inline)]
pub use crate::constants::{close_codes::*, *};
#[cfg(feature = "framework")]
#[doc(no_inline)]
pub use crate::framework::*;
#[cfg(feature = "gateway")]
#[doc(no_inline)]
pub use crate::gateway::*;
#[cfg(feature = "http")]
#[doc(no_inline)]
pub use crate::http::*;
#[cfg(feature = "interactions_endpoint")]
#[doc(no_inline)]
pub use crate::interactions_endpoint::*;
#[cfg(feature = "utils")]
#[doc(no_inline)]
pub use crate::utils::{
token::{validate as validate_token, InvalidToken},
*,
};
#[doc(no_inline)]
pub use crate::{
async_trait,
model::prelude::*,
*,
};
}