* feature: Added .stickyroles command, untested

* ci: possible fix
This commit is contained in:
Kwoth
2024-04-23 15:45:09 +00:00
parent 74690c73d6
commit 08d8da25cd
20 changed files with 11093 additions and 12 deletions

View File

@@ -103,6 +103,7 @@ public class GuildConfig : DbEntity
public string BoostMessage { get; set; } = "%user% just boosted this server!";
public ulong BoostMessageChannelId { get; set; }
public int BoostMessageDeleteAfter { get; set; }
public bool StickyRoles { get; set; }
#endregion
}

View File

@@ -0,0 +1,13 @@
namespace Nadeko.Bot.Db.Models;
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();
}