ChannelPermission

Enum ChannelPermission 

Source
#[repr(u64)]
pub enum ChannelPermission {
Show 33 variants ManageChannel = 1, ManageServer = 2, ManagePermissions = 4, ManageRole = 8, ManageCustomisation = 16, KickMembers = 64, BanMembers = 128, TimeoutMembers = 256, AssignRoles = 512, ChangeNickname = 1_024, ManageNicknames = 2_048, ChangeAvatar = 4_096, RemoveAvatars = 8_192, ViewChannel = 1_048_576, ReadMessageHistory = 2_097_152, SendMessage = 4_194_304, ManageMessages = 8_388_608, ManageWebhooks = 16_777_216, InviteOthers = 33_554_432, SendEmbeds = 67_108_864, UploadFiles = 134_217_728, Masquerade = 268_435_456, React = 536_870_912, Connect = 1_073_741_824, Speak = 2_147_483_648, Video = 4_294_967_296, MuteMembers = 8_589_934_592, DeafenMembers = 17_179_869_184, MoveMembers = 34_359_738_368, MentionEveryone = 137_438_953_472, MentionRoles = 274_877_906_944, GrantAllSafe = 4_503_599_627_370_495, GrantAll = 18_446_744_073_709_551_615,
}
Expand description

Permission value on Revolt

This should be restricted to the lower 52 bits to prevent any potential issues with Javascript. Also leave empty spaces for future permission flags to be added.

Variants§

§

ManageChannel = 1

Manage the channel or channels on the server

§

ManageServer = 2

Manage the server

§

ManagePermissions = 4

Manage permissions on servers or channels

§

ManageRole = 8

Manage roles on server

§

ManageCustomisation = 16

Manage server customisation (includes emoji)

§

KickMembers = 64

Kick other members below their ranking

§

BanMembers = 128

Ban other members below their ranking

§

TimeoutMembers = 256

Timeout other members below their ranking

§

AssignRoles = 512

Assign roles to members below their ranking

§

ChangeNickname = 1_024

Change own nickname

§

ManageNicknames = 2_048

Change or remove other’s nicknames below their ranking

§

ChangeAvatar = 4_096

Change own avatar

§

RemoveAvatars = 8_192

Remove other’s avatars below their ranking

§

ViewChannel = 1_048_576

View a channel

§

ReadMessageHistory = 2_097_152

Read a channel’s past message history

§

SendMessage = 4_194_304

Send a message in a channel

§

ManageMessages = 8_388_608

Delete messages in a channel

§

ManageWebhooks = 16_777_216

Manage webhook entries on a channel

§

InviteOthers = 33_554_432

Create invites to this channel

§

SendEmbeds = 67_108_864

Send embedded content in this channel

§

UploadFiles = 134_217_728

Send attachments and media in this channel

§

Masquerade = 268_435_456

Masquerade messages using custom nickname and avatar

§

React = 536_870_912

React to messages with emojis

§

Connect = 1_073_741_824

Connect to a voice channel

§

Speak = 2_147_483_648

Speak in a voice call

§

Video = 4_294_967_296

Share video in a voice call

§

MuteMembers = 8_589_934_592

Mute other members with lower ranking in a voice call

§

DeafenMembers = 17_179_869_184

Deafen other members with lower ranking in a voice call

§

MoveMembers = 34_359_738_368

Move members between voice channels

§

MentionEveryone = 137_438_953_472

Mention everyone and online members

§

MentionRoles = 274_877_906_944

Mention roles

§

GrantAllSafe = 4_503_599_627_370_495

Safely grant all permissions

§

GrantAll = 18_446_744_073_709_551_615

Grant all permissions

Trait Implementations§

Source§

impl Add<&ChannelPermission> for &ChannelPermission

Source§

type Output = u64

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &ChannelPermission) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&ChannelPermission> for &u64

Source§

type Output = u64

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &ChannelPermission) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&ChannelPermission> for ChannelPermission

Source§

type Output = u64

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &ChannelPermission) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&ChannelPermission> for u64

Source§

type Output = u64

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &ChannelPermission) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&u64> for &ChannelPermission

Source§

type Output = u64

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &u64) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<&u64> for ChannelPermission

Source§

type Output = u64

The resulting type after applying the + operator.
Source§

fn add(self, rhs: &u64) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<ChannelPermission> for &ChannelPermission

Source§

type Output = u64

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ChannelPermission) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<ChannelPermission> for &u64

Source§

type Output = u64

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ChannelPermission) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<ChannelPermission> for u64

Source§

type Output = u64

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ChannelPermission) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<u64> for &ChannelPermission

Source§

type Output = u64

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u64) -> Self::Output

Performs the + operation. Read more
Source§

impl Add<u64> for ChannelPermission

Source§

type Output = u64

The resulting type after applying the + operator.
Source§

fn add(self, rhs: u64) -> Self::Output

Performs the + operation. Read more
Source§

impl Add for ChannelPermission

Source§

type Output = u64

The resulting type after applying the + operator.
Source§

fn add(self, rhs: ChannelPermission) -> Self::Output

Performs the + operation. Read more
Source§

impl Clone for ChannelPermission

Source§

fn clone(&self) -> ChannelPermission

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ChannelPermission

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ChannelPermission

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<ChannelPermission> for PermissionValue

Source§

fn from(v: ChannelPermission) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for ChannelPermission

Source§

fn eq(&self, other: &ChannelPermission) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for ChannelPermission

Source§

impl Eq for ChannelPermission

Source§

impl StructuralPartialEq for ChannelPermission

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.