feat: cache Discord DM channels in database
This commit is contained in:
@@ -1,9 +1,14 @@
|
||||
using Dapper;
|
||||
|
||||
using SqlKata;
|
||||
|
||||
namespace PluralKit.Core;
|
||||
|
||||
public partial class ModelRepository
|
||||
{
|
||||
public async Task<ulong?> GetDmChannel(ulong id)
|
||||
=> await _db.Execute(c => c.QueryFirstOrDefaultAsync<ulong?>("select dm_channel from accounts where uid = @id", new { id = id }));
|
||||
|
||||
public async Task UpdateAccount(ulong id, AccountPatch patch)
|
||||
{
|
||||
_logger.Information("Updated account {accountId}: {@AccountPatch}", id, patch);
|
||||
|
Reference in New Issue
Block a user