177 lines
5.5 KiB
C#
177 lines
5.5 KiB
C#
|
using System;
|
|||
|
|
|||
|
namespace Maki
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// Discord Permission Flags
|
|||
|
/// </summary>
|
|||
|
[Flags]
|
|||
|
public enum DiscordPermission
|
|||
|
{
|
|||
|
/// <summary>
|
|||
|
/// Allows creation of instant invites
|
|||
|
/// </summary>
|
|||
|
CreateInstantInvite = 1,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows kicking members
|
|||
|
/// </summary>
|
|||
|
KickMembers = 1 << 1,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows banning members
|
|||
|
/// </summary>
|
|||
|
BanMembers = 1 << 2,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows all permissions and bypasses channel permission overwrites
|
|||
|
/// </summary>
|
|||
|
Administrator = 1 << 3,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows management and editing of channels
|
|||
|
/// </summary>
|
|||
|
ManageChannels = 1 << 4,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows management and editing of the guild
|
|||
|
/// </summary>
|
|||
|
ManageGuild = 1 << 5,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows for the addition of reactions to messages
|
|||
|
/// </summary>
|
|||
|
AddReactions = 1 << 6,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows viewing the audit log
|
|||
|
/// </summary>
|
|||
|
ViewAuditLog = 1 << 7,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows reading messages in a channel. The channel will not appear for users without this permission
|
|||
|
/// </summary>
|
|||
|
ReadMessages = 1 << 10,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows for sending messages in a channel.
|
|||
|
/// </summary>
|
|||
|
SendMessages = 1 << 11,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows for sending of /tts messages
|
|||
|
/// </summary>
|
|||
|
SendTTSMessages = 1 << 12,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows for deletion of other users messages
|
|||
|
/// </summary>
|
|||
|
ManageMessages = 1 << 13,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Links sent by this user will be auto-embedded
|
|||
|
/// </summary>
|
|||
|
EmbedLinks = 1 << 14,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows for uploading images and files
|
|||
|
/// </summary>
|
|||
|
AttachFiles = 1 << 15,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows for reading of message history
|
|||
|
/// </summary>
|
|||
|
ReadMessageHistory = 1 << 16,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// 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
|
|||
|
/// </summary>
|
|||
|
MentionEveryone = 1 << 17,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows the usage of custom emojis from other servers
|
|||
|
/// </summary>
|
|||
|
ExternalEmojis = 1 << 18,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows for joining of a voice channel
|
|||
|
/// </summary>
|
|||
|
VoiceConnect = 1 << 20,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows for speaking in a voice channel
|
|||
|
/// </summary>
|
|||
|
VoiceSpeak = 1 << 21,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows for muting members in a voice channel
|
|||
|
/// </summary>
|
|||
|
VoiceMuteMembers = 1 << 22,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows for deafening of members in a voice channel
|
|||
|
/// </summary>
|
|||
|
VoiceDeafenMembers = 1 << 23,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows for moving of members between voice channels
|
|||
|
/// </summary>
|
|||
|
VoiceMoveMembers = 1 << 24,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows for using voice-activity-detection in a voice channel
|
|||
|
/// </summary>
|
|||
|
VoiceUseVAD = 1 << 25,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows for modification of own nickname
|
|||
|
/// </summary>
|
|||
|
ChangeNickname = 1 << 26,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows for modification of other users nicknames
|
|||
|
/// </summary>
|
|||
|
ManageNicknames = 1 << 27,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows management and editing of roles
|
|||
|
/// </summary>
|
|||
|
ManageRoles = 1 << 28,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows management and editing of webhooks
|
|||
|
/// </summary>
|
|||
|
ManageWebhooks = 1 << 29,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Allows management and editing of emojis
|
|||
|
/// </summary>
|
|||
|
ManageEmojis = 1 << 30,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// Blank permissions
|
|||
|
/// </summary>
|
|||
|
None = 0,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// All Guild related permissions
|
|||
|
/// </summary>
|
|||
|
AllGuild = CreateInstantInvite | KickMembers | BanMembers | Administrator | ManageChannels | ManageGuild | AddReactions | ViewAuditLog | ChangeNickname | ManageNicknames | ManageRoles | ManageWebhooks | ManageEmojis,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// All text channel permissions
|
|||
|
/// </summary>
|
|||
|
AllText = CreateInstantInvite | ManageChannels | ViewAuditLog | ReadMessages | SendMessages | SendTTSMessages | ManageMessages | EmbedLinks | AttachFiles | ReadMessageHistory | MentionEveryone | ExternalEmojis | ManageRoles | ManageWebhooks | ManageEmojis,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// All voice channel permissions
|
|||
|
/// </summary>
|
|||
|
AllVoice = CreateInstantInvite | ManageChannels | ViewAuditLog | VoiceConnect | VoiceSpeak | VoiceMuteMembers | VoiceDeafenMembers | VoiceMoveMembers | VoiceUseVAD | ManageRoles,
|
|||
|
|
|||
|
/// <summary>
|
|||
|
/// All permissions
|
|||
|
/// </summary>
|
|||
|
All = CreateInstantInvite | KickMembers | BanMembers | Administrator | ManageChannels | ManageGuild | AddReactions | ViewAuditLog | ReadMessages | SendMessages | SendTTSMessages | ManageMessages | EmbedLinks | AttachFiles | ReadMessageHistory | MentionEveryone | ExternalEmojis | VoiceConnect | VoiceSpeak | VoiceMuteMembers | VoiceDeafenMembers | VoiceMoveMembers | VoiceUseVAD | ChangeNickname | ManageNicknames | ManageRoles | ManageWebhooks | ManageEmojis,
|
|||
|
}
|
|||
|
}
|