Skip to content

Commit

Permalink
Remove deprecated audit_log re-exports and types (serenity-rs#1864)
Browse files Browse the repository at this point in the history
The audit log types are no longer re-exported in the `model::guild` module.

BREAKING CHANGES:
- The `audit_log::Action*` enum sub types are renamed to `*Action`.
  For instance, `ActionChannel` to `ChannelAction`.

- The audit log types must be imported directly from the
  `model::guild::audit_log` module.
  • Loading branch information
nickelc authored and kangalio committed Sep 11, 2022
1 parent 9c35237 commit ccea14b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
36 changes: 0 additions & 36 deletions src/model/guild/audit_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ impl Serialize for Action {
}
}

#[deprecated(note = "use `ChannelAction`")]
pub type ActionChannel = ChannelAction;

/// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events).
#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
Expand All @@ -114,9 +111,6 @@ pub enum ChannelAction {
Delete = 12,
}

#[deprecated(note = "use `ChannelOverwriteAction`")]
pub type ActionChannelOverwrite = ChannelOverwriteAction;

/// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events).
#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
Expand All @@ -127,9 +121,6 @@ pub enum ChannelOverwriteAction {
Delete = 15,
}

#[deprecated(note = "use `MemberAction`")]
pub type ActionMember = MemberAction;

/// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events).
#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
Expand All @@ -146,9 +137,6 @@ pub enum MemberAction {
BotAdd = 28,
}

#[deprecated(note = "use `RoleAction`")]
pub type ActionRole = RoleAction;

/// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events).
#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
Expand All @@ -159,9 +147,6 @@ pub enum RoleAction {
Delete = 32,
}

#[deprecated(note = "use `InviteAction`")]
pub type ActionInvite = InviteAction;

/// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events).
#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
Expand All @@ -172,9 +157,6 @@ pub enum InviteAction {
Delete = 42,
}

#[deprecated(note = "use `WebhookAction`")]
pub type ActionWebhook = WebhookAction;

/// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events).
#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
Expand All @@ -185,9 +167,6 @@ pub enum WebhookAction {
Delete = 52,
}

#[deprecated(note = "use `EmojiAction`")]
pub type ActionEmoji = EmojiAction;

/// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events).
#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
Expand All @@ -198,9 +177,6 @@ pub enum EmojiAction {
Delete = 62,
}

#[deprecated(note = "use `MessageAction`")]
pub type ActionMessage = MessageAction;

/// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events).
#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
Expand All @@ -212,9 +188,6 @@ pub enum MessageAction {
Unpin = 75,
}

#[deprecated(note = "use `IntegrationAction`")]
pub type ActionIntegration = IntegrationAction;

/// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events).
#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
Expand All @@ -225,9 +198,6 @@ pub enum IntegrationAction {
Delete = 82,
}

#[deprecated(note = "use `StageInstanceAction`")]
pub type ActionStageInstance = StageInstanceAction;

/// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events).
#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
Expand All @@ -238,9 +208,6 @@ pub enum StageInstanceAction {
Delete = 85,
}

#[deprecated(note = "use `StickerAction`")]
pub type ActionSticker = StickerAction;

/// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events).
#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
Expand All @@ -261,9 +228,6 @@ pub enum ScheduledEventAction {
Delete = 102,
}

#[deprecated(note = "use `ThreadAction`")]
pub type ActionThread = ThreadAction;

/// [Discord docs](https://discord.com/developers/docs/resources/audit-log#audit-log-entry-object-audit-log-events).
#[derive(Copy, Clone, Debug)]
#[non_exhaustive]
Expand Down
3 changes: 0 additions & 3 deletions src/model/guild/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ use tracing::error;
#[cfg(all(feature = "model", feature = "cache"))]
use tracing::warn;

#[doc(hidden)]
#[deprecated(note = "import the types from the `audit_log` module")]
pub use self::audit_log::*;
pub use self::emoji::*;
pub use self::guild_id::*;
pub use self::guild_preview::*;
Expand Down

0 comments on commit ccea14b

Please sign in to comment.