Exemplo n.º 1
0
        public TwitchCommandClient(
            ILogger logger,
            IKernel kernel,
            IBotServer game,
            IMessageBus messageBus,
            ITwitchMessageFormatter messageFormatter,
            ITwitchCommandController commandHandler,
            ITwitchCredentialsProvider credentialsProvider,
            ITwitchPubSubManager pubSubManager)
        {
            this.logger              = logger;
            this.kernel              = kernel;
            this.game                = game;
            this.messageBus          = messageBus;
            this.messageFormatter    = messageFormatter;
            this.commandHandler      = commandHandler;
            this.credentialsProvider = credentialsProvider;
            this.pubSubManager       = pubSubManager;

            //// For the time being, pubsub will be disabled as it needs actual token for the person that wants to use it? worked in the old bot. but not here. Wutfacers
            //// ugh...
            //this.messageBus.Subscribe<string>("streamer_userid_acquired", userid =>
            //{
            //    ListenForChannelPoints(logger, userid);
            //});

            this.messageBus.Subscribe <PubSubToken>("pubsub", OnPubSubTokenReceived);
            CreateTwitchClient();
        }
Exemplo n.º 2
0
 public TwitchCommandClient(
     ILogger logger,
     IKernel kernel,
     ITwitchCommandController commandHandler,
     ITwitchCredentialsProvider credentialsProvider)
 {
     this.logger              = logger;
     this.kernel              = kernel;
     this.commandHandler      = commandHandler;
     this.credentialsProvider = credentialsProvider;
     this.CreateTwitchClient();
 }
 public TwitchCommandClient(
     ILogger logger,
     IKernel kernel,
     IRavenfallServerConnection game,
     ITwitchCommandController commandHandler,
     ITwitchCredentialsProvider credentialsProvider)
 {
     this.logger              = logger;
     this.kernel              = kernel;
     this.game                = game;
     this.commandHandler      = commandHandler;
     this.credentialsProvider = credentialsProvider;
     CreateTwitchClient();
 }
Exemplo n.º 4
0
 public TwitchBotWorker(
     ITwitchCredentialsProvider credentialsProvider,
     IEnumerable <ITwitchCommandHandler> handlers,
     IMessageArchiver messageArchiver,
     IChatMessageStorage chatMessageStorage,
     IMetricsFactory metricsFactory,
     ILogger <TwitchBotWorker> logger)
 {
     this.credentialsProvider = credentialsProvider;
     this.commandHandlers     = handlers.ToDictionary(
         h => h.CommandName,
         h => h);
     this.messageArchiver    = messageArchiver;
     this.chatMessageStorage = chatMessageStorage;
     this.metricsFactory     = metricsFactory;
     this.logger             = logger;
 }