Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Deprecate modifying command application permissions in bulk #2077

Merged
merged 1 commit into from
Jul 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/builder/create_application_command_permission.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use crate::model::application::command::CommandPermissionType;
///
/// [`CommandPermission`]: crate::model::application::command::CommandPermission
#[derive(Clone, Debug, Default)]
#[deprecated(note = "use `CreateApplicationCommandPermissionsData`")]
pub struct CreateApplicationCommandsPermissions(pub Vec<Value>);

impl CreateApplicationCommandsPermissions {
Expand Down Expand Up @@ -57,6 +58,7 @@ impl CreateApplicationCommandsPermissions {
///
/// [`CommandPermission`]: crate::model::application::command::CommandPermission
#[derive(Clone, Debug, Default)]
#[deprecated(note = "use `CreateApplicationCommandPermissionsData`")]
pub struct CreateApplicationCommandPermissions(pub HashMap<&'static str, Value>);

impl CreateApplicationCommandPermissions {
Expand Down
1 change: 1 addition & 0 deletions src/model/guild/guild_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1583,6 +1583,7 @@ impl GuildId {
/// # Errors
///
/// If there is an error, it will be either [`Error::Http`] or [`Error::Json`].
#[deprecated(note = "use `create_appliction_command_permission`.")]
pub async fn set_application_commands_permissions<F>(
&self,
http: impl AsRef<Http>,
Expand Down
1 change: 1 addition & 0 deletions src/model/guild/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -821,6 +821,7 @@ impl Guild {
/// # Errors
///
/// If there is an error, it will be either [`Error::Http`] or [`Error::Json`].
#[deprecated(note = "use `create_appliction_command_permission`.")]
pub async fn set_application_commands_permissions<F>(
&self,
http: impl AsRef<Http>,
Expand Down
1 change: 1 addition & 0 deletions src/model/guild/partial_guild.rs
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,7 @@ impl PartialGuild {
/// # Errors
///
/// If there is an error, it will be either [`Error::Http`] or [`Error::Json`].
#[deprecated(note = "use `create_appliction_command_permission`.")]
pub async fn set_application_commands_permissions<F>(
&self,
http: impl AsRef<Http>,
Expand Down