refactor: change ulong[] to List<ulong> for better ergonomics
This commit is contained in:
parent
e12bd6194b
commit
4eb5c16451
8 changed files with 37 additions and 46 deletions
|
|
@ -6,7 +6,7 @@ public record ConfigExport(
|
|||
ulong Id,
|
||||
ChannelsBackup Channels,
|
||||
string[] BannedSystems,
|
||||
ulong[] KeyRoles,
|
||||
List<ulong> KeyRoles,
|
||||
IEnumerable<InviteExport> Invites,
|
||||
IEnumerable<WatchlistExport> Watchlist
|
||||
);
|
||||
|
|
|
|||
|
|
@ -26,11 +26,11 @@ public class Guild
|
|||
public ChannelConfig Channels { get; init; } = new();
|
||||
public MessageConfig Messages { get; init; } = new();
|
||||
public string[] BannedSystems { get; set; } = [];
|
||||
public ulong[] KeyRoles { get; set; } = [];
|
||||
public List<ulong> KeyRoles { get; set; } = [];
|
||||
|
||||
// These channels and roles are ignored for channel/role update/delete events.
|
||||
public ulong[] IgnoredChannels { get; set; } = [];
|
||||
public ulong[] IgnoredRoles { get; set; } = [];
|
||||
public List<ulong> IgnoredChannels { get; set; } = [];
|
||||
public List<ulong> IgnoredRoles { get; set; } = [];
|
||||
|
||||
public bool IsSystemBanned(PluralkitApiService.PkSystem system) =>
|
||||
BannedSystems.Contains(system.Id) || BannedSystems.Contains(system.Uuid.ToString());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue