public CommandHandler(IServiceProvider serviceProvider) { this.discordClient = serviceProvider.GetRequiredService <DiscordSocketClient>(); this.commandService = serviceProvider.GetRequiredService <CommandService>(); this.logService = serviceProvider.GetRequiredService <LogService>(); this.verificationService = serviceProvider.GetRequiredService <StudentVerificationService>(); this.config = serviceProvider.GetRequiredService <IConfiguration>(); this.serviceProvider = serviceProvider; this.discordClient.MessageReceived += OnMessageReceivedAsync; this.commandService.CommandExecuted += HandlePostExecution; }
public VerificationModule(DiscordSocketClient discordClient, CommandService commandService, StudentVerificationService verificationService) { this.discordClient = discordClient; this.commandService = commandService; this.verificationService = verificationService; }