mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-10 07:47:53 +00:00
Cache account lookup in memory when proxying
This commit is contained in:
parent
5aa47278cb
commit
423d23faf7
5 changed files with 96 additions and 18 deletions
|
|
@ -15,6 +15,8 @@ namespace PluralKit.Bot.Commands
|
|||
public SystemStore Systems { get; set; }
|
||||
public MemberStore Members { get; set; }
|
||||
public EmbedService Embeds { get; set; }
|
||||
|
||||
public ProxyCacheService ProxyCache { get; set; }
|
||||
|
||||
public override string Prefix => "member";
|
||||
public override string ContextNoun => "member";
|
||||
|
|
@ -170,6 +172,8 @@ namespace PluralKit.Bot.Commands
|
|||
ContextEntity.Suffix = prefixAndSuffix[1].Length > 0 ? prefixAndSuffix[1] : null;
|
||||
await Members.Save(ContextEntity);
|
||||
await Context.Channel.SendMessageAsync($"{Emojis.Success} Member proxy tags changed to `{ContextEntity.ProxyString.Sanitize()}`. Try proxying now!");
|
||||
|
||||
ProxyCache.InvalidateResultsForSystem(Context.SenderSystem);
|
||||
}
|
||||
|
||||
[Command("delete")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue