mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
* feature: Added .stickyroles command, untested
* ci: possible fix
This commit is contained in:
@@ -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
|
||||
}
|
13
src/Nadeko.Bot.Db/Models/roles/StickyRoles.cs
Normal file
13
src/Nadeko.Bot.Db/Models/roles/StickyRoles.cs
Normal 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();
|
||||
}
|
Reference in New Issue
Block a user