Пример #1
0
        public KeywordMatcher(TwitchResponseWriter tw, IChannelRepository repo)
        {
            this.tw   = tw;
            this.repo = repo;

            LoadKeywords();
        }
Пример #2
0
        //private readonly IDictionaryRepository repo;

        public CameraCommand(TwitchResponseWriter tw, VrcOscSender osc)//, IDictionaryRepository repo)
        {
            this.tw  = tw;
            this.osc = osc;
            //this.repo = repo;
            this.regCameraCommand = new Regex("^!camera\\s(?<param>.*?)\\s$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
        }
Пример #3
0
 public Blasphemy(TwitchResponseWriter tw, TwitchApiClient api, IBlasphemyRepository repo)
 {
     this.tw           = tw;
     this.api          = api;
     this.repo         = repo;
     this.regBlasphemy = new Regex("^!blasphemy\\s$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
     random            = new Random((int)DateTime.Now.Ticks);
 }
Пример #4
0
        public Quote(TwitchResponseWriter tw, IChannelRepository settingRepo, IQuoteRepository quoteRepo)
        {
            this.tw          = tw;
            this.settingRepo = settingRepo;
            this.quoteRepo   = quoteRepo;

            LoadNicknames();
        }
Пример #5
0
 public Note(TwitchResponseWriter tw, IViewerRepository repo)
 {
     this.tw         = tw;
     this.repo       = repo;
     this.regCommand = new Regex("^!note\\s", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
     this.regUser    = new Regex("^!note\\s@?(?<user>[0-9a-zA-Z_]+?)\\s$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
     this.regNote    = new Regex("^!note\\s(?<note>.*?)\\s$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
 }
Пример #6
0
 public Bnet(TwitchResponseWriter tw, IViewerRepository repo)
 {
     this.tw         = tw;
     this.repo       = repo;
     this.regCommand = new Regex("^!bnet\\s", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
     this.regBnet    = new Regex("^!bnet\\s(?<bnet>[0-9a-zA-Z]+#[0-9]{4,6}?)\\s$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
     this.regUser    = new Regex("^!bnet\\s@?(?<user>[0-9a-zA-Z_]*?)\\s$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
 }
Пример #7
0
 public Viewers(TwitchResponseWriter tw, TwitchApiClient api, IViewerRepository repo)
 {
     this.tw         = tw;
     this.api        = api;
     this.repo       = repo;
     this.ignoreBots = new string[] { "moobot", "nightbot", "whale_bot" };
     this.regViewers = new Regex("^!viewers\\s$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
 }
Пример #8
0
        public AkinatorBot(TwitchResponseWriter tw, TwitchApiClient api)
        {
            this.tw          = tw;
            this.twitchApi   = api;
            this.akinatorApi = new AkinatorApiClient();
            this.cancel      = new CancellationTokenSource();

            State = State.Disabled;
        }
Пример #9
0
 public Question(TwitchResponseWriter tw, TwitchApiClient api, IDictionaryRepository repo)
 {
     this.tw          = tw;
     this.api         = api;
     this.repo        = repo;
     this.regQuestion = new Regex("^@(?<user>[a-zA-Z_0-9]+?)\\s+(?<prefix>(who|which|where|when|what|why|can|do|is|does|are|how|will)?)(\\s.*)?[?]\\s$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
     this.regPretty   = new Regex("pretty|beautiful|wonderful|sexy|bae|(best lucio)|(best mercy)", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
     random           = new Random((int)DateTime.Now.Ticks);
 }
Пример #10
0
 public Command(TwitchResponseWriter tw)
 {
     this.tw         = tw;
     this.regCommand = new Regex("^!(command|cmd)\\s$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
 }
Пример #11
0
 public HowLong(TwitchResponseWriter tw, TwitchApiClient api)
 {
     this.tw         = tw;
     this.api        = api;
     this.regHowLong = new Regex("^!howlong\\s(?<user>[0-9a-zA-Z_]*?)\\s$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
 }
Пример #12
0
        private const int cacheDurationTempRedirect = 86400; //1 day

        public UrlExpander(TwitchResponseWriter tw)
        {
            this.tw     = tw;
            this.regUrl = new Regex("(https?:\\/\\/[a-zA-Z0-9\\._\\/-]{5,25})\\s", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
            this.cache  = new MemoryCache();
        }
Пример #13
0
 public Uptime(TwitchResponseWriter tw, TwitchApiClient api)
 {
     this.tw        = tw;
     this.api       = api;
     this.regUptime = new Regex("^!uptime\\s(?<channel>[0-9a-zA-Z_]*?)\\s$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
 }
Пример #14
0
 public Madlib(TwitchResponseWriter tw, IDictionaryRepository repo)
 {
     this.tw        = tw;
     this.repo      = repo;
     this.regMadlib = new Regex("^!madlib\\s(?<template>.*?)\\s$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
 }
Пример #15
0
 public Define(TwitchResponseWriter tw, IDictionaryRepository repo)
 {
     this.tw        = tw;
     this.repo      = repo;
     this.regDefine = new Regex("^!define\\s(?<word>.*?)\\s$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
 }
Пример #16
0
 public FullWidth(TwitchResponseWriter tw)
 {
     this.tw           = tw;
     this.regFullWidth = new Regex("^!full\\s(?<template>.+?)\\s$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
 }