mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-11 08:10:10 +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
|
|
@ -214,9 +214,8 @@ namespace PluralKit.Bot
|
|||
return;
|
||||
}
|
||||
|
||||
await _db.Execute(c =>
|
||||
c.ExecuteAsync("update system_guild set proxy_enabled = @newValue where system = @system and guild = @guild",
|
||||
new {newValue, system = ctx.System.Id, guild = ctx.Guild.Id}));
|
||||
var patch = new SystemGuildPatch {ProxyEnabled = newValue};
|
||||
await _db.Execute(conn => conn.UpsertSystemGuild(ctx.System.Id, ctx.Guild.Id, patch));
|
||||
|
||||
if (newValue)
|
||||
await ctx.Reply($"Message proxying in this server ({ctx.Guild.Name.EscapeMarkdown()}) is now **enabled** for your system.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue