diff --git a/src/builtins/mod.rs b/src/builtins/mod.rs index 457610e6dd0..45e8082563f 100644 --- a/src/builtins/mod.rs +++ b/src/builtins/mod.rs @@ -12,9 +12,9 @@ pub use pretty_help::*; mod register; pub use register::*; -#[cfg(any(feature = "chrono", feature = "time"))] +#[cfg(feature = "chrono")] mod paginate; -#[cfg(any(feature = "chrono", feature = "time"))] +#[cfg(feature = "chrono")] pub use paginate::*; use crate::{serenity::CreateAllowedMentions, serenity_prelude as serenity, CreateReply}; diff --git a/src/structs/context.rs b/src/structs/context.rs index a9f0d99ff3f..ad6d19ff441 100644 --- a/src/structs/context.rs +++ b/src/structs/context.rs @@ -300,7 +300,7 @@ context_methods! { } /// Return a ID that uniquely identifies this command invocation. - #[cfg(any(feature = "chrono", feature = "time"))] + #[cfg(feature = "chrono")] (id self) (pub fn id(self) -> u64) { match self { @@ -316,11 +316,6 @@ context_methods! { // Calculate Discord's datetime representation (millis since Discord epoch) and // insert those bits into the ID - - #[cfg(feature = "time")] - let timestamp_millis = edited_timestamp.unix_timestamp_nanos() / 1_000_000; - - #[cfg(not(feature = "time"))] let timestamp_millis = edited_timestamp.timestamp_millis(); id |= ((timestamp_millis - 1420070400000) as u64) << 22;