Skip to content

Commit

Permalink
Remove deprecated interaction type aliases, field and method (serenit…
Browse files Browse the repository at this point in the history
  • Loading branch information
nickelc committed Jun 17, 2022
1 parent 1bbe5ac commit 371b045
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 221 deletions.
11 changes: 0 additions & 11 deletions src/builder/create_application_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,17 +332,6 @@ impl CreateApplicationCommand {
self
}

/// Specifies if the command should not be usable by default
///
/// **Note**: Setting it to false will disable it for anyone,
/// including administrators and guild owners.
#[deprecated(note = "replaced by `default_member_permissions`")]
pub fn default_permission(&mut self, default_permission: bool) -> &mut Self {
self.0.insert("default_permission", Value::from(default_permission));

self
}

/// Specifies the description of the application command.
///
/// **Note**: Must be between 1 and 100 characters long.
Expand Down
9 changes: 0 additions & 9 deletions src/model/application/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,19 +77,10 @@ pub struct Command {
/// By default, commands are visible.
#[serde(default)]
pub dm_permission: Option<bool>,
/// Whether the command is enabled by default when
/// the application is added to a guild.
#[serde(default = "default_permission_value")]
#[deprecated(note = "replaced by `default_member_permissions`")]
pub default_permission: bool,
/// An autoincremented version identifier updated during substantial record changes.
pub version: CommandVersionId,
}

fn default_permission_value() -> bool {
true
}

#[cfg(feature = "http")]
impl Command {
/// Creates a global [`Command`],
Expand Down
189 changes: 0 additions & 189 deletions src/model/interactions.rs

This file was deleted.

8 changes: 0 additions & 8 deletions src/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ pub mod event;
pub mod gateway;
pub mod guild;
pub mod id;
#[deprecated(note = "use `model::application::interaction`")]
pub mod interactions;
pub mod invite;
pub mod mention;
pub mod misc;
Expand All @@ -43,12 +41,6 @@ pub mod user;
pub mod voice;
pub mod webhook;

#[deprecated(note = "use `model::application::oauth`")]
pub mod oauth2 {
#[deprecated(note = "use `model::application::oauth::Scope`")]
pub type OAuth2Scope = super::application::oauth::Scope;
}

use std::collections::HashMap;
use std::result::Result as StdResult;

Expand Down
4 changes: 0 additions & 4 deletions src/model/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,9 @@ pub use super::gateway::*;
pub use super::guild::audit_log::*;
pub use super::guild::*;
pub use super::id::*;
#[allow(deprecated)]
pub use super::interactions::*;
pub use super::invite::*;
pub use super::mention::*;
pub use super::misc::*;
#[allow(deprecated)]
pub use super::oauth2::*;
pub use super::permissions::*;
pub use super::sticker::*;
pub use super::user::*;
Expand Down

0 comments on commit 371b045

Please sign in to comment.