Esempio n. 1
0
 public DkpCheckCommand(DiscordConfiguration config, IDkpProcessor dkpProcessor, ILogger <DkpCheckCommand> log)
 {
     channelPattern    = new Regex($@"^\s*((?<character>\w+) dkp|{Regex.Escape(config.CommandPrefix)} (?<character>\w+))\s*$", RegexOptions.IgnoreCase);
     dmPattern         = new Regex(@"^\s*((?<character>\w+) dkp|dkp (?<character>\w+))\s*$", RegexOptions.IgnoreCase);
     this.config       = config;
     this.dkpProcessor = dkpProcessor;
     this.log          = log;
 }
Esempio n. 2
0
 public AuctionProcessor(DkpBotConfiguration configuration, AuctionState state, IItemProcessor itemProcessor, IDkpProcessor dkpProcessor, ILogger <AuctionProcessor> log)
 {
     ranks = configuration.ExpandedRanks;
     this.configuration = configuration;
     this.state         = state;
     this.itemProcessor = itemProcessor;
     this.dkpProcessor  = dkpProcessor;
     this.log           = log;
 }
        public AddDkpCommand(DiscordConfiguration config, IDkpProcessor dkpProcessor, ILogger <AddDkpCommand> log)
        {
            this.config       = config;
            this.dkpProcessor = dkpProcessor;
            this.log          = log;

            pattern = new Regex(
                $@"^{Regex.Escape(config.CommandPrefix)}\s+{Regex.Escape(commandName)}\s+"
                + @"(?<eventId>\d+)\s+"
                + @"(?<value>\d+)[ \t]*"
                + "(?<comment>.*)?(?:\r\n|\n|$)"
                + "(?<lines>(?:.*(?:\r\n|\n|$))*)",
                RegexOptions.IgnoreCase);
        }