mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
Restructured the project structure back to the way it was, there's no reasonable way to split the modules
This commit is contained in:
18
src/NadekoBot/Db/Models/roles/ReactionRole.cs
Normal file
18
src/NadekoBot/Db/Models/roles/ReactionRole.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
#nullable disable
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Nadeko.Bot.Db.Models;
|
||||
|
||||
public class ReactionRoleV2 : DbEntity
|
||||
{
|
||||
public ulong GuildId { get; set; }
|
||||
public ulong ChannelId { get; set; }
|
||||
|
||||
public ulong MessageId { get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string Emote { get; set; }
|
||||
public ulong RoleId { get; set; }
|
||||
public int Group { get; set; }
|
||||
public int LevelReq { get; set; }
|
||||
}
|
11
src/NadekoBot/Db/Models/roles/SelfAssignableRole.cs
Normal file
11
src/NadekoBot/Db/Models/roles/SelfAssignableRole.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
#nullable disable
|
||||
namespace Nadeko.Bot.Db.Models;
|
||||
|
||||
public class SelfAssignedRole : DbEntity
|
||||
{
|
||||
public ulong GuildId { get; set; }
|
||||
public ulong RoleId { get; set; }
|
||||
|
||||
public int Group { get; set; }
|
||||
public int LevelRequirement { get; set; }
|
||||
}
|
14
src/NadekoBot/Db/Models/roles/StickyRoles.cs
Normal file
14
src/NadekoBot/Db/Models/roles/StickyRoles.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace Nadeko.Bot.Db.Models;
|
||||
|
||||
#nullable disable
|
||||
public class StickyRole : DbEntity
|
||||
{
|
||||
public ulong GuildId { get; set; }
|
||||
public string RoleIds { get; set; }
|
||||
public ulong UserId { get; set; }
|
||||
|
||||
public ulong[] GetRoleIds()
|
||||
=> string.IsNullOrWhiteSpace(RoleIds)
|
||||
? []
|
||||
: RoleIds.Split(',').Select(ulong.Parse).ToArray();
|
||||
}
|
Reference in New Issue
Block a user