project
This commit is contained in:
parent
5c5b975b93
commit
e891c3ea6b
@ -5,7 +5,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<Title>Luski.Shared</Title>
|
||||
<Version>1.1.0-alpha44</Version>
|
||||
<Version>1.1.0-alpha48</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -9,18 +9,9 @@ public class CategoryPostCTS : CTS
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("parent")]
|
||||
public long Parent { get; set; }
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("color_type")]
|
||||
public ColorType ColorType { get; set; } = ColorType.Full;
|
||||
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("color")]
|
||||
public string Color { get; set; } = string.Empty;
|
||||
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("description")]
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
@ -10,12 +10,6 @@ public class ChannelPostCTS : CTS
|
||||
[JsonPropertyName("parent")]
|
||||
public long Parent { get; set; }
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("color_type")]
|
||||
public ColorType ColorType { get; set; } = ColorType.Full;
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("color")]
|
||||
public string Color { get; set; } = string.Empty;
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("type")]
|
||||
public ChannelType Type { get; set; } = ChannelType.TextAndVoice;
|
||||
[JsonInclude]
|
||||
|
@ -5,156 +5,168 @@ namespace Luski.Shared.PublicServers.V1.Enums;
|
||||
[Flags]
|
||||
public enum ServerPermission : long
|
||||
{
|
||||
None = 0b_0000000000000000000000000000000000000000000000000000000000000000,
|
||||
None = 0b_0000000000000000000000000000000000000000000000000000000000000000,
|
||||
/// <summary>
|
||||
/// Internal permission for quick permission lookup.
|
||||
/// </summary>
|
||||
[Description("Internal permission for quick permission lookup")]
|
||||
[GlobalAttributes.DisplayName("View This")]
|
||||
[Category("Internal")]
|
||||
ViewThis = 0b_0000000000000000000000000000000000000000000000000000000000000001,
|
||||
ViewThis = 0b_0000000000000000000000000000000000000000000000000000000000000001,
|
||||
[Description("User can view channels")]
|
||||
[GlobalAttributes.DisplayName("View Channels")]
|
||||
[Category("General")]
|
||||
ViewChannels = 0b_0000000000000000000000000000000000000000000000000000000000000010,
|
||||
ViewChannels = 0b_0000000000000000000000000000000000000000000000000000000000000010,
|
||||
[Description("User can move channels")]
|
||||
[GlobalAttributes.DisplayName("Move Channels")]
|
||||
[Category("General")]
|
||||
MoveChannels = 0b_0000000000000000000000000000000000000000000000000000000000000100,
|
||||
MoveChannels = 0b_0000000000000000000000000000000000000000000000000000000000000100,
|
||||
[Description("User can edit channels")]
|
||||
[GlobalAttributes.DisplayName("Edit Channels")]
|
||||
[Category("General")]
|
||||
EditChannels = 0b_0000000000000000000000000000000000000000000000000000000000001000,
|
||||
EditChannels = 0b_0000000000000000000000000000000000000000000000000000000000001000,
|
||||
[Description("User can edit channel permissions")]
|
||||
[GlobalAttributes.DisplayName("Edit Channel Permissions")]
|
||||
[Category("General")]
|
||||
EditChannelPermissions = 0b_0000000000000000000000000000000000000000000000000000000000010000,
|
||||
EditChannelPermissions = 0b_0000000000000000000000000000000000000000000000000000000000010000,
|
||||
[Description("User can create channels")]
|
||||
[GlobalAttributes.DisplayName("Create Channels")]
|
||||
[Category("General")]
|
||||
CreateChannels = 0b_0000000000000000000000000000000000000000000000000000000000100000,
|
||||
CreateChannels = 0b_0000000000000000000000000000000000000000000000000000000000100000,
|
||||
[Description("User can delete channels")]
|
||||
[GlobalAttributes.DisplayName("Delete Channels")]
|
||||
[Category("General")]
|
||||
DeleteChannels = 0b_0000000000000000000000000000000000000000000000000000000001000000,
|
||||
DeleteChannels = 0b_0000000000000000000000000000000000000000000000000000000001000000,
|
||||
[Description("User can view categories")]
|
||||
[GlobalAttributes.DisplayName("View Categories")]
|
||||
[Category("General")]
|
||||
ViewCategories = 0b_0000000000000000000000000000000000000000000000000000000010000000,
|
||||
ViewCategories = 0b_0000000000000000000000000000000000000000000000000000000010000000,
|
||||
[Description("User can move categories")]
|
||||
[GlobalAttributes.DisplayName("Move Categories")]
|
||||
[Category("General")]
|
||||
MoveCategories = 0b_0000000000000000000000000000000000000000000000000000000100000000,
|
||||
MoveCategories = 0b_0000000000000000000000000000000000000000000000000000000100000000,
|
||||
[Description("User can edit categories")]
|
||||
[GlobalAttributes.DisplayName("Edit Categories")]
|
||||
[Category("General")]
|
||||
EditCategories = 0b_0000000000000000000000000000000000000000000000000000001000000000,
|
||||
EditCategories = 0b_0000000000000000000000000000000000000000000000000000001000000000,
|
||||
[Description("User can edit category permissions")]
|
||||
[GlobalAttributes.DisplayName("Edit Category Permissions")]
|
||||
[Category("General")]
|
||||
EditCategoryPermissions = 0b_0000000000000000000000000000000000000000000000000000010000000000,
|
||||
EditCategoryPermissions = 0b_0000000000000000000000000000000000000000000000000000010000000000,
|
||||
[Description("User can create categories")]
|
||||
[GlobalAttributes.DisplayName("Create Categories")]
|
||||
[Category("General")]
|
||||
CreateCategories = 0b_0000000000000000000000000000000000000000000000000000100000000000,
|
||||
CreateCategories = 0b_0000000000000000000000000000000000000000000000000000100000000000,
|
||||
[Description("User can delete categories")]
|
||||
[GlobalAttributes.DisplayName("Delete Categories")]
|
||||
[Category("General")]
|
||||
DeleteCategories = 0b_0000000000000000000000000000000000000000000000000001000000000000,
|
||||
DeleteCategories = 0b_0000000000000000000000000000000000000000000000000001000000000000,
|
||||
[Description("User can delete keys")]
|
||||
[GlobalAttributes.DisplayName("Delete Keys")]
|
||||
[Category("General")]
|
||||
DeleteKeys = 0b_0000000000000000000000000000000000000000000000000010000000000000,
|
||||
DeleteKeys = 0b_0000000000000000000000000000000000000000000000000010000000000000,
|
||||
[Description("User can manage roles")]
|
||||
[GlobalAttributes.DisplayName("Manage Roles")]
|
||||
[Category("General")]
|
||||
ManageRoles = 0b_0000000000000000000000000000000000000000000000000100000000000000,
|
||||
ManageRoles = 0b_0000000000000000000000000000000000000000000000000100000000000000,
|
||||
[Description("User can view logs")]
|
||||
[GlobalAttributes.DisplayName("View Logs")]
|
||||
[Category("General")]
|
||||
ViewLogs = 0b_0000000000000000000000000000000000000000000000001000000000000000,
|
||||
ViewLogs = 0b_0000000000000000000000000000000000000000000000001000000000000000,
|
||||
[Description("User can manage the server")]
|
||||
[GlobalAttributes.DisplayName("Manage Server")]
|
||||
[Category("General")]
|
||||
ManageServer = 0b_0000000000000000000000000000000000000000000000010000000000000000,
|
||||
ManageServer = 0b_0000000000000000000000000000000000000000000000010000000000000000,
|
||||
[Description("User can add servers")]
|
||||
[GlobalAttributes.DisplayName("Add Servers")]
|
||||
[Category("General")]
|
||||
AddServers = 0b_0000000000000000000000000000000000000000000000100000000000000000,
|
||||
AddServers = 0b_0000000000000000000000000000000000000000000000100000000000000000,
|
||||
[Description("User can remove servers")]
|
||||
[GlobalAttributes.DisplayName("Remove Servers")]
|
||||
[Category("General")]
|
||||
RemoveServers = 0b_0000000000000000000000000000000000000000000001000000000000000000,
|
||||
RemoveServers = 0b_0000000000000000000000000000000000000000000001000000000000000000,
|
||||
[Description("User can invite people to the server if invite codes are required")]
|
||||
[GlobalAttributes.DisplayName("Invite")]
|
||||
[Category("General")]
|
||||
Invite = 0b_0000000000000000000000000000000000000000000010000000000000000000,
|
||||
Invite = 0b_0000000000000000000000000000000000000000000010000000000000000000,
|
||||
[Description("User can kick people")]
|
||||
[GlobalAttributes.DisplayName("Kick")]
|
||||
[Category("General")]
|
||||
Kick = 0b_0000000000000000000000000000000000000000000100000000000000000000,
|
||||
Kick = 0b_0000000000000000000000000000000000000000000100000000000000000000,
|
||||
[Description("User can ban people")]
|
||||
[GlobalAttributes.DisplayName("Ban")]
|
||||
[Category("General")]
|
||||
Ban = 0b_0000000000000000000000000000000000000000001000000000000000000000,
|
||||
Ban = 0b_0000000000000000000000000000000000000000001000000000000000000000,
|
||||
[Description("User can send messages")]
|
||||
[GlobalAttributes.DisplayName("Send Messages")]
|
||||
[Category("Text Channel")]
|
||||
SendMessages = 0b_0000000000000000000000000000000000000000010000000000000000000000,
|
||||
SendMessages = 0b_0000000000000000000000000000000000000000010000000000000000000000,
|
||||
[Description("User can send files")]
|
||||
[GlobalAttributes.DisplayName("Send Files")]
|
||||
[Category("Text Channel")]
|
||||
SendFiles = 0b_0000000000000000000000000000000000000000100000000000000000000000,
|
||||
SendFiles = 0b_0000000000000000000000000000000000000000100000000000000000000000,
|
||||
[Description("User can ping channels")]
|
||||
[GlobalAttributes.DisplayName("Ping Channels")]
|
||||
[Category("Text Channel")]
|
||||
ChannelPings = 0b_0000000000000000000000000000000000000001000000000000000000000000,
|
||||
ChannelPings = 0b_0000000000000000000000000000000000000001000000000000000000000000,
|
||||
[Description("User can ping the server")]
|
||||
[GlobalAttributes.DisplayName("Ping Server")]
|
||||
[Category("Text Channel")]
|
||||
ServerPings = 0b_0000000000000000000000000000000000000010000000000000000000000000,
|
||||
ServerPings = 0b_0000000000000000000000000000000000000010000000000000000000000000,
|
||||
[Description("User can ping people")]
|
||||
[GlobalAttributes.DisplayName("Ping Someone")]
|
||||
[Category("Text Channel")]
|
||||
PingSomeone = 0b_0000000000000000000000000000000000000100000000000000000000000000,
|
||||
PingSomeone = 0b_0000000000000000000000000000000000000100000000000000000000000000,
|
||||
[Description("User can manage messages")]
|
||||
[GlobalAttributes.DisplayName("Manage Messages")]
|
||||
[Category("Text Channel")]
|
||||
ManageMessages = 0b_0000000000000000000000000000000000001000000000000000000000000000,
|
||||
ManageMessages = 0b_0000000000000000000000000000000000001000000000000000000000000000,
|
||||
[Description("User can read message history")]
|
||||
[GlobalAttributes.DisplayName("Read Message History")]
|
||||
[Category("Text Channel")]
|
||||
ReadMessageHistory = 0b_0000000000000000000000000000000000010000000000000000000000000000,
|
||||
ReadMessageHistory = 0b_0000000000000000000000000000000000010000000000000000000000000000,
|
||||
[Description("User can use commands")]
|
||||
[GlobalAttributes.DisplayName("Use Commands")]
|
||||
[Category("Text Channel")]
|
||||
UseServerCommands = 0b_0000000000000000000000000000000000100000000000000000000000000000,
|
||||
UseServerCommands = 0b_0000000000000000000000000000000000100000000000000000000000000000,
|
||||
[Description("User can join voice chats")]
|
||||
[GlobalAttributes.DisplayName("Join Voice")]
|
||||
[Category("Voice Channel")]
|
||||
JoinVoice = 0b_0000000000000000000000000000000001000000000000000000000000000000,
|
||||
JoinVoice = 0b_0000000000000000000000000000000001000000000000000000000000000000,
|
||||
[Description("User can speak in voice")]
|
||||
[GlobalAttributes.DisplayName("Speak In Voice")]
|
||||
[Category("Voice Channel")]
|
||||
SpeakInVoice = 0b_0000000000000000000000000000000010000000000000000000000000000000,
|
||||
SpeakInVoice = 0b_0000000000000000000000000000000010000000000000000000000000000000,
|
||||
[Description("User can mute people in voice")]
|
||||
[GlobalAttributes.DisplayName("Mute Members In Voice")]
|
||||
[Category("Voice Channel")]
|
||||
MuteMembers = 0b_0000000000000000000000000000000100000000000000000000000000000000,
|
||||
MuteMembers = 0b_0000000000000000000000000000000100000000000000000000000000000000,
|
||||
[Description("User can defen people in voice")]
|
||||
[GlobalAttributes.DisplayName("Deafen Members In Voice")]
|
||||
[Category("Voice Channel")]
|
||||
DeafenMembers = 0b_0000000000000000000000000000001000000000000000000000000000000000,
|
||||
DeafenMembers = 0b_0000000000000000000000000000001000000000000000000000000000000000,
|
||||
[Description("User can move people in voice")]
|
||||
[GlobalAttributes.DisplayName("Move Members In Voice")]
|
||||
[Category("Voice Channel")]
|
||||
MoveMembers = 0b_0000000000000000000000000000010000000000000000000000000000000000,
|
||||
MoveMembers = 0b_0000000000000000000000000000010000000000000000000000000000000000,
|
||||
[Description("User can manage profiles")]
|
||||
[GlobalAttributes.DisplayName("Manage Profiles")]
|
||||
[Category("Personalization")]
|
||||
ManageProfiles = 0b_0000000000000000000000000000100000000000000000000000000000000000,
|
||||
ManageProfiles = 0b_0000000000000000000000000000100000000000000000000000000000000000,
|
||||
[Description("User can create profiles")]
|
||||
[GlobalAttributes.DisplayName("Create Profiles")]
|
||||
[Category("Personalization")]
|
||||
CreateProfile = 0b_0000000000000000000000000001000000000000000000000000000000000000,
|
||||
CreateProfile = 0b_0000000000000000000000000001000000000000000000000000000000000000,
|
||||
[Description("User can change profile text restrictions")]
|
||||
[GlobalAttributes.DisplayName("Change Profile Text Restrictions")]
|
||||
[Category("General")]
|
||||
ChangeProfileTextRestrictions = 0b_0000000000000000000000000010000000000000000000000000000000000000,
|
||||
[Description("User can change channel title text restrictions")]
|
||||
[GlobalAttributes.DisplayName("Change Channel Title Text Restrictions")]
|
||||
[Category("General")]
|
||||
ChangeChannelTitleTextRestrictions = 0b_0000000000000000000000000100000000000000000000000000000000000000,
|
||||
[Description("User can change category title text restrictions")]
|
||||
[GlobalAttributes.DisplayName("Change Category Title Text Restrictions")]
|
||||
[Category("General")]
|
||||
ChangeCategoryTitleTextRestrictions = 0b_0000000000000000000000001000000000000000000000000000000000000000,
|
||||
}
|
13
Luski.Shared/PublicServers/V1/Enums/TextModification.cs
Normal file
13
Luski.Shared/PublicServers/V1/Enums/TextModification.cs
Normal file
@ -0,0 +1,13 @@
|
||||
namespace Luski.Shared.PublicServers.V1.Enums;
|
||||
|
||||
[Flags]
|
||||
public enum TextModification : byte
|
||||
{
|
||||
Rainbow = 0b_0000_0001,
|
||||
Gradient = 0b_0000_0010,
|
||||
Color = 0b_0000_0100,
|
||||
FontSize = 0b_0000_1000,
|
||||
PX = 0b_0001_0000,
|
||||
URL = 0b_0010_0000,
|
||||
Italic = 0b_0100_0000,
|
||||
}
|
@ -13,12 +13,6 @@ public class CategorySTC : STC
|
||||
[JsonPropertyName("picture_type")]
|
||||
public PictureType PictureType { get; set; }
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("color_type")]
|
||||
public ColorType ColorType { get; set; } = ColorType.Full;
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("color")]
|
||||
public string Color { get; set; } = string.Empty;
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
[JsonInclude]
|
||||
|
@ -13,12 +13,6 @@ public class ChannelSTC : STC
|
||||
[JsonPropertyName("parent")]
|
||||
public long Parent { get; set; }
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("color_type")]
|
||||
public ColorType ColorType { get; set; } = ColorType.Full;
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("color")]
|
||||
public string Color { get; set; } = string.Empty;
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("type")]
|
||||
public ChannelType Type { get; set; }
|
||||
[JsonInclude]
|
||||
|
@ -22,6 +22,15 @@ public class ServerInfoSTC : STC
|
||||
[JsonPropertyName("picture_type")]
|
||||
public PictureType PictureType { get; set; }
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("allowed_profile_text_modifications")]
|
||||
public TextModification ProfileModifications { get; set; } = TextModification.Rainbow | TextModification.Gradient | TextModification.Color | TextModification.Italic;
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("allowed_channel_text_modifications")]
|
||||
public TextModification ChannelModifications { get; set; } = TextModification.Rainbow | TextModification.Gradient | TextModification.Color | TextModification.Italic;
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("allowed_category_text_modifications")]
|
||||
public TextModification CategoryModifications { get; set; } = TextModification.Rainbow | TextModification.Gradient | TextModification.Color | TextModification.Italic;
|
||||
[JsonInclude]
|
||||
[JsonPropertyName("alternate_servers")]
|
||||
public ServerData[] AlternateServers { get; set; } =Array.Empty<ServerData>();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user