This commit is contained in:
sam 2024-08-16 17:04:24 +02:00
parent 7ea945b427
commit 99c1587e7b
Signed by: sam
GPG key ID: 5F3C3C1B3166639D
12 changed files with 35 additions and 35 deletions

View file

@ -31,7 +31,8 @@ public class ChannelCacheService
}); });
} }
public bool TryGet(Snowflake id, [NotNullWhen(true)] out IChannel? channel) => _channels.TryGetValue(id, out channel); public bool TryGet(Snowflake id, [NotNullWhen(true)] out IChannel? channel) =>
_channels.TryGetValue(id, out channel);
public void Remove(Snowflake? guildId, Snowflake id, out IChannel? channel) public void Remove(Snowflake? guildId, Snowflake id, out IChannel? channel)
{ {

View file

@ -9,8 +9,7 @@ public class Guild
[DatabaseGenerated(DatabaseGeneratedOption.None)] [DatabaseGenerated(DatabaseGeneratedOption.None)]
public required ulong Id { get; init; } public required ulong Id { get; init; }
[Column(TypeName = "jsonb")] [Column(TypeName = "jsonb")] public ChannelConfig Channels { get; init; } = new();
public ChannelConfig Channels { get; init; } = new();
public List<string> BannedSystems { get; init; } = []; public List<string> BannedSystems { get; init; } = [];
public List<ulong> KeyRoles { get; init; } = []; public List<ulong> KeyRoles { get; init; } = [];