예제 #1
0
 public ReactionAdded(EmbedService embeds, ILogger logger, IDatabase db, ModelRepository repo, CommandMessageService commandMessageService)
 {
     _embeds = embeds;
     _db     = db;
     _repo   = repo;
     _commandMessageService = commandMessageService;
     _logger = logger.ForContext <ReactionAdded>();
 }
예제 #2
0
 public ReactionAdded(ILogger logger, IDatabase db, ModelRepository repo, CommandMessageService commandMessageService, IDiscordCache cache, Bot bot, DiscordApiClient rest, EmbedService embeds)
 {
     _db   = db;
     _repo = repo;
     _commandMessageService = commandMessageService;
     _cache  = cache;
     _bot    = bot;
     _rest   = rest;
     _embeds = embeds;
     _logger = logger.ForContext <ReactionAdded>();
 }
예제 #3
0
        private Timer _periodicTask; // Never read, just kept here for GC reasons

        public Bot(DiscordShardedClient client, ILifetimeScope services, ILogger logger, PeriodicStatCollector collector, IMetrics metrics,
                   ErrorMessageService errorMessageService, CommandMessageService commandMessageService)
        {
            _client                = client;
            _logger                = logger.ForContext <Bot>();
            _services              = services;
            _collector             = collector;
            _metrics               = metrics;
            _errorMessageService   = errorMessageService;
            _commandMessageService = commandMessageService;
        }
예제 #4
0
 public Context(ILifetimeScope provider, DiscordClient shard, DiscordMessage message, int commandParseOffset,
                PKSystem senderSystem, MessageContext messageContext)
 {
     _rest                  = provider.Resolve <DiscordRestClient>();
     _client                = provider.Resolve <DiscordShardedClient>();
     _message               = message;
     _shard                 = shard;
     _senderSystem          = senderSystem;
     _messageContext        = messageContext;
     _db                    = provider.Resolve <IDatabase>();
     _repo                  = provider.Resolve <ModelRepository>();
     _metrics               = provider.Resolve <IMetrics>();
     _provider              = provider;
     _commandMessageService = provider.Resolve <CommandMessageService>();
     _parameters            = new Parameters(message.Content.Substring(commandParseOffset));
 }
예제 #5
0
 public Context(ILifetimeScope provider, Shard shard, Guild?guild, Channel channel, MessageCreateEvent message, int commandParseOffset,
                PKSystem senderSystem, MessageContext messageContext)
 {
     _message               = message;
     _shard                 = shard;
     _guild                 = guild;
     _channel               = channel;
     _senderSystem          = senderSystem;
     _messageContext        = messageContext;
     _cache                 = provider.Resolve <IDiscordCache>();
     _db                    = provider.Resolve <IDatabase>();
     _repo                  = provider.Resolve <ModelRepository>();
     _metrics               = provider.Resolve <IMetrics>();
     _provider              = provider;
     _commandMessageService = provider.Resolve <CommandMessageService>();
     _parameters            = new Parameters(message.Content?.Substring(commandParseOffset));
     _rest                  = provider.Resolve <DiscordApiClient>();
     _cluster               = provider.Resolve <Cluster>();
 }