Exemplo n.º 1
0
        public TwitchChatClient(TwitchClientSettings settings)
        {
            var credentials = new ConnectionCredentials(settings.TwitchUsername, settings.TwitchOAuth);

            _twitchClient    = new TwitchClient(credentials, settings.TwitchChannel);
            _twitchApi       = new TwitchAPI(settings.TwitchClientId);
            _followerService = new FollowerService(_twitchApi);
            _twitchClient.OnChatCommandReceived     += ChatCommandReceived;
            _twitchClient.OnNewSubscriber           += NewSubscriber;
            _followerService.OnNewFollowersDetected += NewFollower;
        }
Exemplo n.º 2
0
        public TwitchChatClient(TwitchClientSettings settings, ITwitchAPI twitchApi)
        {
            _settings  = settings;
            _twitchApi = twitchApi;
            var credentials = new ConnectionCredentials(settings.TwitchUsername, settings.TwitchOAuth);

            _twitchClient = new TwitchClient(credentials, settings.TwitchChannel);
            _twitchClient.OnChatCommandReceived += ChatCommandReceived;
            _twitchClient.OnNewSubscriber       += NewSubscriber;
            _twitchClient.OnUserJoined          += TwitchClientOnOnUserJoined;
            _twitchClient.OnUserLeft            += TwitchClientOnOnUserLeft;
        }
Exemplo n.º 3
0
        public TwitchChatClient(TwitchClientSettings settings, ITwitchAPI twitchApi, ILoggerAdapter <TwitchChatClient> logger)
        {
            _settings  = settings;
            _twitchApi = twitchApi;
            _logger    = logger;
            var credentials = new ConnectionCredentials(settings.TwitchUsername, settings.TwitchBotOAuth);

            _twitchClient = new TwitchClient();
            _twitchClient.Initialize(credentials, channel: settings.TwitchChannel);
            _twitchClient.OnChatCommandReceived += ChatCommandReceived;
            _twitchClient.OnNewSubscriber       += NewSubscriber;
            _twitchClient.OnUserJoined          += TwitchClientOnOnUserJoined;
            _twitchClient.OnUserLeft            += TwitchClientOnOnUserLeft;
        }
Exemplo n.º 4
0
 public TwitchStreamingInfoService(ITwitchAPI twitchApi, TwitchClientSettings twitchClientSettings)
 {
     _twitchApi            = twitchApi;
     _twitchClientSettings = twitchClientSettings;
 }