예제 #1
0
        public ErrorHandler(
            Config.BotConfiguration botConfig,
            ICommunication communication)
        {
            this.botConfig     = botConfig;
            this.communication = communication;

            communication.DebugMessageHandlers += DebugMessageHandler;
        }
예제 #2
0
 public StandardConfigurator(
     Config.BotConfiguration botConfig,
     ICommunication communication,
     ErrorHandler errorHandler,
     API.Twitch.HelixHelper helixHelper,
     API.Twitch.IBotTokenValidator botTokenValidator,
     API.Twitch.IBroadcasterTokenValidator broadcasterTokenValidator)
     : base(botConfig, communication, errorHandler)
 {
     this.helixHelper               = helixHelper;
     this.botTokenValidator         = botTokenValidator;
     this.broadcasterTokenValidator = broadcasterTokenValidator;
 }
        public BaseConfigurator(
            Config.BotConfiguration botConfig,
            ICommunication communication,
            ErrorHandler errorHandler)
        {
            this.botConfig = botConfig;

            //Assign library log handlers
            BGC.Debug.ExceptionCallback += errorHandler.LogExternalException;

            BGC.Debug.LogCallback        += communication.SendDebugMessage;
            BGC.Debug.LogWarningCallback += communication.SendWarningMessage;
            BGC.Debug.LogErrorCallback   += communication.SendErrorMessage;
        }
        public MessageAccumulator(
            Config.BotConfiguration botConfig,
            ICommunication communication,
            IHubContext <MonitorHub> monitorHubContext)
        {
            this.botConfig         = botConfig;
            this.monitorHubContext = monitorHubContext;

            communication.ReceiveEventHandlers               += ReceiveEvent;
            communication.ReceiveMessageLoggers              += ReceiveChatter;
            communication.DebugMessageHandlers               += ReceiveDebugMessage;
            communication.SendWhisperHandlers                += ReceiveWhisperSent;
            communication.SendMessageHandlers                += ReceiveMessageSent;
            communication.ReceiveNotificationHandlers        += ReceiveNotification;
            communication.ReceivePendingNotificationHandlers += ReceivePendingNotification;
        }