mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Migrate guild objects to the patch system
This commit is contained in:
parent
467ce78522
commit
0598c53f62
11 changed files with 124 additions and 62 deletions
16
PluralKit.Core/Models/Patch/GuildPatch.cs
Normal file
16
PluralKit.Core/Models/Patch/GuildPatch.cs
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
namespace PluralKit.Core
|
||||
{
|
||||
public class GuildPatch: PatchObject
|
||||
{
|
||||
public Partial<ulong?> LogChannel { get; set; }
|
||||
public Partial<ulong[]> LogBlacklist { get; set; }
|
||||
public Partial<ulong[]> Blacklist { get; set; }
|
||||
public Partial<bool> LogCleanupEnabled { get; set; }
|
||||
|
||||
public override UpdateQueryBuilder Apply(UpdateQueryBuilder b) => b
|
||||
.With("log_channel", LogChannel)
|
||||
.With("log_blacklist", LogBlacklist)
|
||||
.With("blacklist", Blacklist)
|
||||
.With("log_cleanup_enabled", LogCleanupEnabled);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue