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; }
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; }
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; }
public TwitchStreamingInfoService(ITwitchAPI twitchApi, TwitchClientSettings twitchClientSettings) { _twitchApi = twitchApi; _twitchClientSettings = twitchClientSettings; }