mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
feat(bot): don't query db message context when running commands
This commit is contained in:
parent
7cb3a3ea0f
commit
9848b88d5b
9 changed files with 67 additions and 65 deletions
|
|
@ -9,6 +9,9 @@ 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<bool> GetAutoproxyEnabled(ulong id)
|
||||
=> await _db.QueryFirst<bool>(new Query("accounts").Select("allow_autoproxy").Where("uid", id));
|
||||
|
||||
public async Task UpdateAccount(ulong id, AccountPatch patch)
|
||||
{
|
||||
_logger.Information("Updated account {accountId}: {@AccountPatch}", id, patch);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue