Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add name for "Manage Events" permission #2046

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/model/permissions.rs
Expand Up @@ -373,6 +373,7 @@ generate_get_permission_names! {
kick_members: "Kick Members",
manage_channels: "Manage Channels",
manage_emojis_and_stickers: "Manage Emojis and Stickers",
manage_events: "Manage Events",
manage_guild: "Manage Guilds",
manage_messages: "Manage Messages",
manage_nicknames: "Manage Nicknames",
Expand Down Expand Up @@ -583,6 +584,15 @@ impl Permissions {
self.contains(Self::MANAGE_EMOJIS_AND_STICKERS)
}

/// Shorthand for checking that the set of permissions contains the
/// [Manage Events] permission.
///
/// [Manage Events]: Self::MANAGE_EVENTS
#[must_use]
pub fn manage_events(self) -> bool {
self.contains(Self::MANAGE_EVENTS)
}

/// Shorthand for checking that the set of permissions contains the
/// [Manage Guild] permission.
///
Expand Down