public void OnApplicationStart() { Logger.log.Debug("OnApplicationStart"); ChatCoreInstance = ChatCoreInstance.Create(); ChatService = ChatCoreInstance.RunAllServices(); //this._controller = new GameObject("MultiSongRequestManagerController").AddComponent<MultiSongRequestManagerController>(); RequestBot.Current.Init(); }
private static IEnumerator CheckChat() { yield return(new WaitForSeconds(1)); sc = ChatCoreInstance.Create(); var svc = sc.RunTwitchServices(); svc.OnTextMessageReceived += Svc_OnTextMessageReceived; }
public void OnApplicationStart() { Log.Debug("OnApplicationStart"); //new GameObject("StreamlabsChatController").AddComponent<StreamlabsChatController>(); this.streamlabsService = new StreamlabsService(new StreamlabsServer()); this.streamlabsService.OnTextMessageReceived += this.StreamlabsService_OnTextMessageReceived; var instance = ChatCoreInstance.Create(); this.chatServiceMultiplexer = instance.RunAllServices(); }
public Plugin(Conf conf, IPALogger logger) { Log = logger; Instance = this; var chatcore = ChatCoreInstance.Create(); Config.Instance = conf.Generated <Config>(); ChatCoreMultiplexer = chatcore.RunAllServices(); MenuButton = new MenuButton("Custom Alerts", ShowMainFlowCoordinator); }
public void Awake() { ChatCoreInstance chatCore = ChatCoreInstance.Create(); twitchService = chatCore.RunTwitchServices(); twitchService.OnTextMessageReceived += OnMessage; DontDestroyOnLoad(this); enabled = false; }
public void Initialize() { Logger.Debug("Initialize call"); this.CoreInstance = ChatCoreInstance.Create(); this.MultiplexerInstance = this.CoreInstance.RunAllServices(); this.MultiplexerInstance.OnLogin -= this.MultiplexerInstance_OnLogin; this.MultiplexerInstance.OnLogin += this.MultiplexerInstance_OnLogin; this.MultiplexerInstance.OnJoinChannel -= this.MultiplexerInstance_OnJoinChannel; this.MultiplexerInstance.OnJoinChannel += this.MultiplexerInstance_OnJoinChannel; this.TwitchService = this.MultiplexerInstance.GetTwitchService(); this.MultiplexerInstance.OnTextMessageReceived += this.MultiplexerInstance_OnTextMessageReceived; }
public override void OnEnable() { base.OnEnable(); _sc = ChatCoreInstance.Create(); //_sc.OnLogReceived += _sc_OnLogReceived; _svcs = _sc.RunAllServices(); _svcs.OnJoinChannel += QueueOrSendOnJoinChannel; _svcs.OnTextMessageReceived += QueueOrSendOnTextMessageReceived; _svcs.OnChatCleared += QueueOrSendOnClearChat; _svcs.OnMessageCleared += QueueOrSendOnClearMessage; _svcs.OnChannelResourceDataCached += QueueOrSendOnChannelResourceDataCached; ChatImageProvider.TouchInstance(); Task.Run(HandleOverflowMessageQueue); BSEvents.menuSceneLoadedFresh += BSEvents_menuSceneLoadedFresh; }
public Form1() { InitializeComponent(); var streamCore = ChatCoreInstance.Create(); streamingService = streamCore.RunAllServices(); twitchService = streamingService.GetTwitchService(); streamingService.OnLogin += StreamingService_OnLogin; streamingService.OnTextMessageReceived += StreamServiceProvider_OnMessageReceived; streamingService.OnJoinChannel += StreamServiceProvider_OnChannelJoined; streamingService.OnLeaveChannel += StreamServiceProvider_OnLeaveChannel; streamingService.OnRoomStateUpdated += StreamServiceProvider_OnChannelStateUpdated; //Console.WriteLine($"StreamService is of type {streamServiceProvider.ServiceType.Name}"); }
public Form1() { InitializeComponent(); var chatCore = ChatCoreInstance.Create(); chatCore.OnLogReceived += (level, category, message) => Debug.WriteLine($"{level} | {category} | {message}"); _streamingService = chatCore.RunAllServices(); _twitchService = _streamingService.GetTwitchService(); _streamingService.OnLogin += StreamingService_OnLogin; _streamingService.OnTextMessageReceived += StreamServiceProvider_OnMessageReceived; _streamingService.OnJoinChannel += StreamServiceProvider_OnChannelJoined; _streamingService.OnLeaveChannel += StreamServiceProvider_OnLeaveChannel; _streamingService.OnRoomStateUpdated += StreamServiceProvider_OnChannelStateUpdated; //Console.WriteLine($"StreamService is of type {streamServiceProvider.ServiceType.Name}"); }
private void Awake() { this._chatCoreInstance = ChatCoreInstance.Create(); #if DEBUG this._chatCoreInstance.OnLogReceived += this._sc_OnLogReceived; #endif this._chatServiceMultiplexer = this._chatCoreInstance.RunAllServices(); this._chatServiceMultiplexer.OnJoinChannel += this.QueueOrSendOnJoinChannel; this._chatServiceMultiplexer.OnTextMessageReceived += this.QueueOrSendOnTextMessageReceived; this._chatServiceMultiplexer.OnChatCleared += this.QueueOrSendOnClearChat; this._chatServiceMultiplexer.OnMessageCleared += this.QueueOrSendOnClearMessage; this._chatServiceMultiplexer.OnChannelResourceDataCached += this.QueueOrSendOnChannelResourceDataCached; ChatImageProvider.TouchInstance(); _ = this.HandleOverflowMessageQueue(); BSEvents.lateMenuSceneLoadedFresh += this.BSEvents_menuSceneLoadedFresh; }
public void Init() { if (initialized) { return; } // create chat core instance _sc = ChatCoreInstance.Create(); // run twitch services _twitchService = _sc.RunTwitchServices(); _twitchService.OnTextMessageReceived += _services_OnTextMessageReceived; initialized = true; }
public static void StartChatService() { twitchChannel = Plugin.config.GetString("Twitch", "Channel", "TWITCH_NAME"); if (twitchChannel == "TWITCH_NAME") { Plugin.config.SetString("Twitch", "Channel", "TWITCH_NAME"); return; } unitySyncContext = SynchronizationContext.Current; var streamCore = ChatCoreInstance.Create(); streamingService = streamCore.RunAllServices(); twitchService = streamingService.GetTwitchService(); streamingService.OnLogin += StreamingService_OnLogin; streamingService.OnTextMessageReceived += StreamServiceProvider_OnMessageReceived; streamingService.OnJoinChannel += StreamServiceProvider_OnChannelJoined; streamingService.OnLeaveChannel += StreamServiceProvider_OnLeaveChannel; streamingService.OnRoomStateUpdated += StreamServiceProvider_OnChannelStateUpdated; //Console.WriteLine($"StreamService is of type {streamServiceProvider.ServiceType.Name}"); }
public ChatCoreHandler() { if (initialized) { return; } // create chat core instance // run twitch services try { var sc = ChatCoreInstance.Create(); _twitchService = ((ChatCoreInstance)sc).RunTwitchServices(); ((TwitchService)_twitchService).OnTextMessageReceived += _services_OnTextMessageReceived; } catch (Exception e) { Plugin.Log($"Exception was caught when trying to send bot message. {e.ToString()}"); } initialized = true; }