コード例 #1
0
 /// <summary>
 ///     Creates a new <see cref="CommandHandler" />.
 /// </summary>
 /// <param name="client">The <see cref="DiscordShardedClient" /> that will be used to receive all the messages.</param>
 /// <param name="commandService">The <see cref="CommandService" /> that will be used to execute the commands.</param>
 /// <param name="logger">The <see cref="ILogger" /> that will be used to log all the messages.</param>
 /// <param name="prefixService">The <see cref="IPrefixService" /> that will be used.</param>
 /// <param name="commandErrorHandler">The <see cref="ICommandErrorHandler" /> that will be used to handle command errors.</param>
 /// <param name="commandInputErrorHandler">
 ///     The <see cref="ICommandInputErrorHandler" /> that will be used when the input
 ///     for a command is wrong.
 /// </param>
 /// <param name="spamFilter">
 ///     The <see cref="ISpamFilter" /> that will be used to filter out users that are spamming
 ///     commands.
 /// </param>
 public CommandHandler(DiscordShardedClient client, CommandService commandService, ILogger logger, IPrefixService prefixService,
                       ICommandErrorHandler commandErrorHandler, ICommandInputErrorHandler commandInputErrorHandler, ISpamFilter spamFilter)
 {
     _client                   = client;
     _commandService           = commandService;
     _logger                   = logger;
     _prefixService            = prefixService;
     _commandErrorHandler      = commandErrorHandler;
     _commandInputErrorHandler = commandInputErrorHandler;
     _spamFilter               = spamFilter;
 }
コード例 #2
0
 public EmailService(ISpamFilter spamFilter, ILogger logger)
 {
     this.spamFilter = spamFilter;
     this.logger     = logger;
 }
コード例 #3
0
ファイル: LeadScreen.cs プロジェクト: indrajitdan/Sherlock
 public LeadScreen()
 {
     _spamFilter = new SpamFilter();
 }