Ejemplo n.º 1
0
 public ButtcoinCommand(ButtcoinService buttcoinService, IConfiguration config)
 {
     _buttcoinService = buttcoinService;
     _logoUrl         = config["Bot:LogoUrl"];
     _linkUrl         = config["Bot:LinkUrl"];
     _emote           = Emote.Parse(config["Bot:RawEmoji"]);
 }
Ejemplo n.º 2
0
 public MessageListener(IConfiguration config, ButtcoinService buttcoinService, ConfigurationService configurationService)
 {
     _buttcoinService      = buttcoinService;
     _configurationService = configurationService;
     _random    = new Random();
     _botPrefix = config["Bot:Prefix"];
     _plusPlus  = new Regex("^" + _botPrefix + "(.+)\\+\\+$");
     _logoUrl   = config["Bot:LogoUrl"];
     _emote     = Emote.Parse(config["Bot:RawEmoji"]);
 }
Ejemplo n.º 3
0
        public MessageListener(ConfigurationService configurationService, ButtcoinService buttcoinService, TwitchApi twitchApi)
        {
            _configurationService = configurationService;
            _buttcoinService      = buttcoinService;
            _twitchApi            = twitchApi;
            _random = new Random();

            _liveChannels = twitchApi.IsTargetsLive().Result;
            var isLiveTimer = new Timer();

            isLiveTimer.Elapsed += async(sender, args) =>
            {
                _liveChannels = await twitchApi.IsTargetsLive();
            };
            isLiveTimer.Interval = TimeSpan.FromMinutes(5).TotalMilliseconds;
            isLiveTimer.Enabled  = true;
        }
Ejemplo n.º 4
0
 public HomeController(DiscordOAuthService oAuthService, DiscordService discordService, ButtcoinService buttcoinService)
 {
     _oAuthService    = oAuthService;
     _discordService  = discordService;
     _buttcoinService = buttcoinService;
 }