mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
Major database refactor (again)
This commit is contained in:
parent
3996cd48c7
commit
c7612df37e
55 changed files with 1014 additions and 1100 deletions
|
|
@ -15,7 +15,7 @@ namespace PluralKit.Bot
|
|||
{
|
||||
public class Context
|
||||
{
|
||||
private ILifetimeScope _provider;
|
||||
private readonly ILifetimeScope _provider;
|
||||
|
||||
private readonly DiscordRestClient _rest;
|
||||
private readonly DiscordShardedClient _client;
|
||||
|
|
@ -24,8 +24,8 @@ namespace PluralKit.Bot
|
|||
private readonly Parameters _parameters;
|
||||
private readonly MessageContext _messageContext;
|
||||
|
||||
private readonly IDataStore _data;
|
||||
private readonly IDatabase _db;
|
||||
private readonly ModelRepository _repo;
|
||||
private readonly PKSystem _senderSystem;
|
||||
private readonly IMetrics _metrics;
|
||||
|
||||
|
|
@ -38,10 +38,10 @@ namespace PluralKit.Bot
|
|||
_client = provider.Resolve<DiscordShardedClient>();
|
||||
_message = message;
|
||||
_shard = shard;
|
||||
_data = provider.Resolve<IDataStore>();
|
||||
_senderSystem = senderSystem;
|
||||
_messageContext = messageContext;
|
||||
_db = provider.Resolve<IDatabase>();
|
||||
_repo = provider.Resolve<ModelRepository>();
|
||||
_metrics = provider.Resolve<IMetrics>();
|
||||
_provider = provider;
|
||||
_parameters = new Parameters(message.Content.Substring(commandParseOffset));
|
||||
|
|
@ -61,9 +61,8 @@ namespace PluralKit.Bot
|
|||
|
||||
public Parameters Parameters => _parameters;
|
||||
|
||||
// TODO: this is just here so the extension methods can access it; should it be public/private/?
|
||||
internal IDataStore DataStore => _data;
|
||||
internal IDatabase Database => _db;
|
||||
internal ModelRepository Repository => _repo;
|
||||
|
||||
public Task<DiscordMessage> Reply(string text = null, DiscordEmbed embed = null, IEnumerable<IMention> mentions = null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue