public CommandHandler(IServiceProvider services, MajorContext config, DiscordSocketClient client, CommandService commands, ILogger <CommandHandler> logger) { _services = services; _config = config; _client = client; _commands = commands; Log = logger; _client.MessageReceived += MessageReceived; }
public MajorBot(IServiceProvider services, MajorContext context) { _provider = services; _context = context; _applicationConfig = _provider.GetRequiredService <IOptions <MajorConfig> >().Value; _client = _provider.GetRequiredService <DiscordSocketClient>(); _commands = _provider.GetRequiredService <CommandService>(); _applicationLifetime = _provider.GetRequiredService <IHostApplicationLifetime>(); _serilogAdapter = new DiscordSerilogAdapter(_provider.GetRequiredService <ILogger <DiscordSerilogAdapter> >()); Log = _provider.GetRequiredService <ILogger <MajorBot> >(); // Just construct it so we have a concrete reference to it. _provider.GetRequiredService <CommandHandler>(); }
public RolesModule(MajorContext dbContext, ILogger <RolesModule> logger) { _dbContext = dbContext; Log = logger; }
public HelpModule(ICommandHelpService commandHelpService, MajorContext config) { _commandHelpService = commandHelpService; _config = config; }
public CommandChannelModule(MajorContext context) { _context = context; }
public GuildModule(MajorContext context) { _context = context; }
public GreetingModule(MajorContext context, IHostEnvironment environment, IServiceProvider services) { _context = context; _environment = environment; _services = services; }
public GeneralModule(DiscordSocketClient discordClient, MajorContext dbContext) { _discordClient = discordClient; _dbContext = dbContext; }