Permissions class

A set of permissions.

External references:

Inheritance
Available Extensions

Constructors

Permissions(int value)
Create a new Permissions from a permissions value.
const

Properties

canAddReactions bool
Whether this set of permissions has the addReactions permission.
no setter
canAttachFiles bool
Whether this set of permissions has the attachFiles permission.
no setter
canBanMembers bool
Whether this set of permissions has the banMembers permission.
no setter
canChangeNickname bool
Whether this set of permissions has the changeNickname permission.
no setter
canConnect bool
Whether this set of permissions has the connect permission.
no setter
canCreateEmojiAndStickers bool
Whether this set of permissions has the createEmojiAndStickers permission.
no setter
canCreateEvents bool
Whether this set of permissions has the createEvents permission.
no setter
canCreateInstantInvite bool
Whether this set of permissions has the createInstantInvite permission.
no setter
canCreatePrivateThreads bool
Whether this set of permissions has the createPrivateThreads permission.
no setter
canCreatePublicThreads bool
Whether this set of permissions has the createPublicThreads permission.
no setter
canDeafenMembers bool
Whether this set of permissions has the deafenMembers permission.
no setter
Whether this set of permissions has the embedLinks permission.
no setter
canKickMembers bool
Whether this set of permissions has the kickMembers permission.
no setter
canManageChannels bool
Whether this set of permissions has the manageChannels permission.
no setter
canManageEmojisAndStickers bool
Whether this set of permissions has the manageEmojisAndStickers permission.
no setter
canManageEvents bool
Whether this set of permissions has the manageEvents permission.
no setter
canManageGuild bool
Whether this set of permissions has the manageGuild permission.
no setter
canManageMessages bool
Whether this set of permissions has the manageMessages permission.
no setter
canManageNicknames bool
Whether this set of permissions has the manageNicknames permission.
no setter
canManageRoles bool
Whether this set of permissions has the manageRoles permission.
no setter
canManageThreads bool
Whether this set of permissions has the manageThreads permission.
no setter
canManageWebhooks bool
Whether this set of permissions has the manageWebhooks permission.
no setter
canMentionEveryone bool
Whether this set of permissions has the mentionEveryone permission.
no setter
canModerateMembers bool
Whether this set of permissions has the moderateMembers permission.
no setter
canMoveMembers bool
Whether this set of permissions has the moveMembers permission.
no setter
canMuteMembers bool
Whether this set of permissions has the muteMembers permission.
no setter
canReadMessageHistory bool
Whether this set of permissions has the readMessageHistory permission.
no setter
canRequestToSpeak bool
Whether this set of permissions has the requestToSpeak permission.
no setter
canSendMessages bool
Whether this set of permissions has the sendMessages permission.
no setter
canSendMessagesInThreads bool
Whether this set of permissions has the sendMessagesInThreads permission.
no setter
canSendTtsMessages bool
Whether this set of permissions has the sendTtsMessages permission.
no setter
canSendVoiceMessages bool
Whether this set of permissions has the sendVoiceMessages permission.
no setter
canSpeak bool
Whether this set of permissions has the speak permission.
no setter
canStream bool
Whether this set of permissions has the stream permission.
no setter
canUseApplicationCommands bool
Whether this set of permissions has the useApplicationCommands permission.
no setter
canUseEmbeddedActivities bool
Whether this set of permissions has the useEmbeddedActivities permission.
no setter
canUseExternalEmojis bool
Whether this set of permissions has the useExternalEmojis permission.
no setter
canUseExternalSounds bool
Whether this set of permissions has the useExternalSounds permission.
no setter
canUseExternalStickers bool
Whether this set of permissions has the useExternalStickers permission.
no setter
canUseSoundboard bool
Whether this set of permissions has the useSoundboard permission.
no setter
canUseVad bool
Whether this set of permissions has the useVad permission.
no setter
canViewAuditLog bool
Whether this set of permissions has the viewAuditLog permission.
no setter
canViewChannel bool
Whether this set of permissions has the viewChannel permission.
no setter
canViewCreatorMonetizationAnalytics bool
Whether this set of permissions has the viewCreatorMonetizationAnalytics permission.
no setter
canViewGuildInsights bool
Whether this set of permissions has the viewGuildInsights permission.
no setter
first Flag<Permissions>
The first element.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isAdministrator bool
Whether this set of permissions has the administrator permission.
no setter
isEmpty bool
Whether this collection has no elements.
no setterinherited
isNotEmpty bool
Whether this collection has at least one element.
no setterinherited
isPrioritySpeaker bool
Whether this set of permissions has the prioritySpeaker permission.
no setter
iterator Iterator<Flag<Permissions>>
A new Iterator that allows iterating the elements of this Iterable.
no setterinherited
last Flag<Permissions>
The last element.
no setterinherited
length int
The number of elements in this.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
single Flag<Permissions>
Checks that this iterable has only one element, and returns that element.
no setterinherited
value int
The integer value encoding the flags as a bitfield.
finalinherited

Methods

any(bool test(Flag<Permissions> element)) bool
Checks whether any element of this iterable satisfies test.
inherited
cast<R>() Iterable<R>
A view of this iterable as an iterable of R instances.
inherited
contains(Object? element) bool
Whether the collection contains an element equal to element.
inherited
defaultToString() String
Same as toString, but only called when dart:mirrors is not available.
inherited
elementAt(int index) Flag<Permissions>
Returns the indexth element.
inherited
every(bool test(Flag<Permissions> element)) bool
Checks whether every element of this iterable satisfies test.
inherited
expand<T>(Iterable<T> toElements(Flag<Permissions> element)) Iterable<T>
Expands each element of this Iterable into zero or more elements.
inherited
firstWhere(bool test(Flag<Permissions> element), {Flag<Permissions> orElse()?}) Flag<Permissions>
The first element that satisfies the given predicate test.
inherited
fold<T>(T initialValue, T combine(T previousValue, Flag<Permissions> element)) → T
Reduces a collection to a single value by iteratively combining each element of the collection with an existing value
inherited
followedBy(Iterable<Flag<Permissions>> other) Iterable<Flag<Permissions>>
Creates the lazy concatenation of this iterable and other.
inherited
forEach(void action(Flag<Permissions> element)) → void
Invokes action on each element of this iterable in iteration order.
inherited
has(Flag<Permissions> flag) bool
Returns true if this Flags has the flag enabled, false otherwise.
inherited
join([String separator = ""]) String
Converts each element to a String and concatenates the strings.
inherited
lastWhere(bool test(Flag<Permissions> element), {Flag<Permissions> orElse()?}) Flag<Permissions>
The last element that satisfies the given predicate test.
inherited
map<T>(T toElement(Flag<Permissions> e)) Iterable<T>
The current elements of this iterable modified by toElement.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reduce(Flag<Permissions> combine(Flag<Permissions> value, Flag<Permissions> element)) Flag<Permissions>
Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.
inherited
singleWhere(bool test(Flag<Permissions> element), {Flag<Permissions> orElse()?}) Flag<Permissions>
The single element that satisfies test.
inherited
skip(int count) Iterable<Flag<Permissions>>
Creates an Iterable that provides all but the first count elements.
inherited
skipWhile(bool test(Flag<Permissions> value)) Iterable<Flag<Permissions>>
Creates an Iterable that skips leading elements while test is satisfied.
inherited
take(int count) Iterable<Flag<Permissions>>
Creates a lazy iterable of the count first elements of this iterable.
inherited
takeWhile(bool test(Flag<Permissions> value)) Iterable<Flag<Permissions>>
Creates a lazy iterable of the leading elements satisfying test.
inherited
toList({bool growable = true}) List<Flag<Permissions>>
Creates a List containing the elements of this Iterable.
inherited
toSet() Set<Flag<Permissions>>
Creates a Set containing the same elements as this iterable.
inherited
toString() String
A string representation of this object.
inherited
where(bool test(Flag<Permissions> element)) Iterable<Flag<Permissions>>
Creates a new lazy Iterable with all elements that satisfy the predicate test.
inherited
whereType<T>() Iterable<T>
Creates a new lazy Iterable with all elements that have type T.
inherited

Operators

operator &(Flags<Permissions> other) Flags<Permissions>
Return a set of flags that has all the flags set in both this and other.
inherited
operator ==(Object other) bool
The equality operator.
inherited
operator ^(Flags<Permissions> other) Flags<Permissions>
Return a set of flags that has all the flags set in this or in other but not in both.
inherited
operator |(Flags<Permissions> other) Flags<Permissions>
Return a set of flags that has all the flags set in either this or other.
inherited
operator ~() Flags<Permissions>
Returns the opposite of this set of flags.
inherited

Constants

addReactions → const Flag<Permissions>
Allows for the addition of reactions to messages.
administrator → const Flag<Permissions>
Allows all permissions and bypasses channel permission overwrites.
allPermissions → const Permissions
A Permissions with all permissions enabled.
attachFiles → const Flag<Permissions>
Allows for uploading images and files.
banMembers → const Flag<Permissions>
Allows banning members.
changeNickname → const Flag<Permissions>
Allows for modification of own nickname.
connect → const Flag<Permissions>
Allows for joining of a voice channel.
createEmojiAndStickers → const Flag<Permissions>
Allows for creating emojis, stickers, and soundboard sounds, and editing and deleting those created by the current user.
createEvents → const Flag<Permissions>
Allows for creating scheduled events, and editing and deleting those created by the current user.
createInstantInvite → const Flag<Permissions>
Allows creation of instant invites.
createPrivateThreads → const Flag<Permissions>
Allows for creating private threads.
createPublicThreads → const Flag<Permissions>
Allows for creating public and announcement threads.
deafenMembers → const Flag<Permissions>
Allows for deafening of members in a voice channel.
Links sent by users with this permission will be auto-embedded.
kickMembers → const Flag<Permissions>
Allows kicking members.
manageChannels → const Flag<Permissions>
Allows management and editing of channels.
manageEmojisAndStickers → const Flag<Permissions>
Allows for editing and deleting emojis, stickers, and soundboard sounds created by all users.
manageEvents → const Flag<Permissions>
Allows for editing and deleting scheduled events created by all users.
manageGuild → const Flag<Permissions>
Allows management and editing of the guild.
manageMessages → const Flag<Permissions>
Allows for deletion of other users messages.
manageNicknames → const Flag<Permissions>
Allows for modification of other users nicknames.
manageRoles → const Flag<Permissions>
Allows management and editing of roles.
manageThreads → const Flag<Permissions>
Allows for deleting and archiving threads, and viewing all private threads.
manageWebhooks → const Flag<Permissions>
Allows management and editing of webhooks.
mentionEveryone → const Flag<Permissions>
Allows for using the @everyone tag to notify all users in a channel, and the @here tag to notify all online users in a channel.
moderateMembers → const Flag<Permissions>
Allows for timing out users to prevent them from sending or reacting to messages in chat and threads, and from speaking in voice and stage channels.
moveMembers → const Flag<Permissions>
Allows for moving of members between voice channels.
muteMembers → const Flag<Permissions>
Allows for muting members in a voice channel.
prioritySpeaker → const Flag<Permissions>
Allows for using priority speaker in a voice channel.
readMessageHistory → const Flag<Permissions>
Allows for reading of message history.
requestToSpeak → const Flag<Permissions>
Allows for requesting to speak in stage channels. (This permission is under active development and may be changed or removed.).
sendMessages → const Flag<Permissions>
Allows for sending messages in a channel and creating threads in a forum (does not allow sending messages in threads).
sendMessagesInThreads → const Flag<Permissions>
Allows for sending messages in threads.
sendTtsMessages → const Flag<Permissions>
Allows for sending of /tts messages.
sendVoiceMessages → const Flag<Permissions>
Allows sending voice messages.
speak → const Flag<Permissions>
Allows for speaking in a voice channel.
stream → const Flag<Permissions>
Allows the user to go live.
useApplicationCommands → const Flag<Permissions>
Allows members to use application commands, including slash commands and context menu commands..
useEmbeddedActivities → const Flag<Permissions>
Allows for using Activities (applications with the EMBEDDED flag) in a voice channel.
useExternalEmojis → const Flag<Permissions>
Allows the usage of custom emojis from other servers.
useExternalSounds → const Flag<Permissions>
Allows the usage of custom soundboard sounds from other servers.
useExternalStickers → const Flag<Permissions>
Allows the usage of custom stickers from other servers.
useSoundboard → const Flag<Permissions>
Allows for using soundboard in a voice channel.
useVad → const Flag<Permissions>
Allows for using voice-activity-detection in a voice channel.
viewAuditLog → const Flag<Permissions>
Allows for viewing of audit logs.
viewChannel → const Flag<Permissions>
Allows guild members to view a channel, which includes reading messages in text channels and joining voice channels.
viewCreatorMonetizationAnalytics → const Flag<Permissions>
Allows for viewing role subscription insights.
viewGuildInsights → const Flag<Permissions>
Allows for viewing guild insights.