refactor: change ulong[] to List<ulong> for better ergonomics

This commit is contained in:
sam 2024-11-18 21:01:52 +01:00
parent e12bd6194b
commit 4eb5c16451
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
8 changed files with 37 additions and 46 deletions

View file

@ -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());