enum Discord::Permissions
Defined in:
discordcr/mappings/permissions.crEnum Members
-
CreateInstantInvite =
1_u64
-
KickMembers =
2_u64
-
BanMembers =
4_u64
-
Administrator =
8_u64
-
ManageChannels =
16_u64
-
ManageGuild =
32_u64
-
AddReactions =
64_u64
-
ViewAuditLog =
128_u64
-
PrioritySpeaker =
256_u64
-
Stream =
512_u64
-
ReadMessages =
1024_u64
-
SendMessages =
2048_u64
-
SendTTSMessages =
4096_u64
-
ManageMessages =
8192_u64
-
EmbedLinks =
16384_u64
-
AttachFiles =
32768_u64
-
ReadMessageHistory =
65536_u64
-
MentionEveryone =
131072_u64
-
UseExternalEmojis =
262144_u64
-
Connect =
1048576_u64
-
Speak =
2097152_u64
-
MuteMembers =
4194304_u64
-
DeafenMembers =
8388608_u64
-
MoveMembers =
16777216_u64
-
UseVAD =
33554432_u64
-
ChangeNickname =
67108864_u64
-
ManageNicknames =
134217728_u64
-
ManageRoles =
268435456_u64
-
ManageWebhooks =
536870912_u64
-
ManageEmojis =
1073741824_u64
-
UseApplicationCommands =
2147483648_u64
-
RequestToSpeak =
4294967296_u64
-
ManageThreads =
17179869184_u64
-
UsePrivateThreads =
68719476736_u64
-
UseExternalStickers =
137438953472_u64
-
SendMessagesInThreads =
274877906944_u64
-
UseEmbeddedActivities =
549755813888_u64
-
ModerateMembers =
1099511627776_u64
Constructors
Instance Method Summary
- #add_reactions?
- #administrator?
- #attach_files?
- #ban_members?
- #change_nickname?
- #connect?
- #create_instant_invite?
- #deafen_members?
- #embed_links?
- #kick_members?
- #manage_channels?
- #manage_emojis?
- #manage_guild?
- #manage_messages?
- #manage_nicknames?
- #manage_roles?
- #manage_threads?
- #manage_webhooks?
- #mention_everyone?
- #moderate_members?
- #move_members?
- #mute_members?
- #none?
- #priority_speaker?
- #read_message_history?
- #read_messages?
- #request_to_speak?
- #send_messages?
- #send_messages_in_threads?
- #send_tts_messages?
- #speak?
- #stream?
-
#to_json(json : JSON::Builder)
Serializes this enum member by name.
- #use_application_commands?
- #use_embedded_activities?
- #use_external_emojis?
- #use_external_stickers?
- #use_private_threads?
- #use_vad?
- #view_audit_log?
Constructor Detail
Instance Method Detail
def to_json(json : JSON::Builder)
#
Description copied from struct Enum
Serializes this enum member by name.
For non-flags enums, the serialization is a JSON string. The value is the
member name (see #to_s
) transformed with String#underscore
.
enum Stages
INITIAL
SECOND_STAGE
end
Stages::INITIAL.to_json # => %("initial")
Stages::SECOND_STAGE.to_json # => %("second_stage")
For flags enums, the serialization is a JSON array including every flagged
member individually serialized in the same way as a member of a non-flags enum.
None
is serialized as an empty array, All
as an array containing
all members.
@[Flags]
enum Sides
LEFT
RIGHT
end
Sides::LEFT.to_json # => %(["left"])
(Sides::LEFT | Sides::RIGHT).to_json # => %(["left","right"])
Sides::All.to_json # => %(["left","right"])
Sides::None.to_json # => %([])
ValueConverter.to_json
offers a different serialization strategy based on the
member value.