Пример #1
0
 protected virtual void OnLeaveChannel(object sender, OnLeftChannelArgs args)
 {
     Task.Run(async() =>
     {
         try
         {
             if (args.Channel.Trim().ToLower() == args.Channel.Trim().ToLower())
             {
                 await FireConnectionServerBotEventAsync(sender, new ConnectionServerBotEventArgs
                 {
                     ConnectionServerEventType = ConnectionServerEventType.DisconnectedFromServer,
                     ConnectionEventType       = ConnectionEventType.DisconnectedFromTwitch,
                     Server = this,
                     Bot    = _bot
                 });
             }
         }
         catch (Exception ex)
         {
             await FireErrorEventAsync(sender, new ErrorBotServerConnectEventArgs
             {
                 Bot = _bot,
                 ErrorBotServerConnectEventType = ErrorBotServerConnectEventType.LeaveChannel,
                 Exception = ex,
                 Server    = this
             });
         }
     });
 }
Пример #2
0
 private void Client_OnLeftChannel(object sender, OnLeftChannelArgs e)
 {
     if (BotEnvironment.Settings["show.debug"] == "true")
     {
         Logger.WriteLine("Client_OnLeftChannel", Color.DarkCyan);
     }
 }
        private void TwitchClient_OnLeftChannel(object sender, OnLeftChannelArgs e)
        {
            client.OnLeftChannel -= TwitchClient_OnLeftChannel;

            leaveChannelCompletionTask.SetResult(true);
            leaveChannelCompletionTask = new TaskCompletionSource <bool>();
        }
Пример #4
0
        private void OnLeftChannel(object sender, OnLeftChannelArgs e)
        {
            this.JoinedChannel = null;
            UpdateStatus($"Left channel {e.Channel}");

            StopTimer();
        }
Пример #5
0
 private void OnLeftChannel(object sender, OnLeftChannelArgs e)
 {
     //Wenn CHannel verlassen wurde, neu beitreten.
     if (client.IsConnected)
     {
         client.JoinChannel(txtChannel1.Text);
     }
 }
Пример #6
0
 private void Client_OnLeftChannel(object sender, OnLeftChannelArgs e)
 {
     consoleMessage[1] = "#";
     consoleMessage[3] = e.BotUsername;
     consoleMessage[4] = e.Channel;
     consoleMessage[5] = "Left Channel";
     Program.SendToConsole(consoleMessage);
 }
Пример #7
0
        private async Task Client_OnLeftChannel(object sender, OnLeftChannelArgs e)
        {
            var date = DateTime.UtcNow;

            _logger.LogInformation(
                $"{DateTime.UtcNow.ToString(CultureInfo.CurrentUICulture)}: Completed leaving the channel {e.Channel}");
            await _calculator.CalculateStreamStatistics(e.Channel, date).ConfigureAwait(false);
        }
Пример #8
0
        /// <summary>
        /// [handler] ПОКИНУТЬ канал
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void onChannelLeft(object sender, OnLeftChannelArgs e)
        {
            CheckForIllegalCrossThreadCalls = false;

            printInfo("Succefully left channel '" + currChannel + "'!");
            currChannel           = "";
            client.OnLeftChannel -= onChannelLeft;
        }
 private void onLeftChannel(object sender, OnLeftChannelArgs e)
 {
     Dispatcher.Invoke(new Action(() => {
         Model.Client.OnLeftChannel -= onLeftChannel;
         _messageSendTimer.Stop();
         _whisperSendTimer.Stop();
         //SendChatMessage("Knowledge is power.");
     }));
 }
Пример #10
0
        private void Client_OnLeftChannel(object sender, OnLeftChannelArgs e)
        {
            BotDisconnectedArgs args = new BotDisconnectedArgs {
                Channel = e.Channel
            };

            Console.WriteLine("Just left " + e.Channel);
            BotDisconnected?.Invoke(this, args);
        }
Пример #11
0
 private void OnLeftChannel(object sender, OnLeftChannelArgs e)
 {
     this.Dispatcher.Invoke(() =>
     {
         spChatLines.Children.Clear();
         butConnect.IsEnabled    = true;
         txtChannel.IsEnabled    = true;
         butDisconnect.IsEnabled = false;
     });
 }
Пример #12
0
        private void TwitchClient_OnLeftChannel(Object sender, OnLeftChannelArgs e)
        {
            Writer.WriteLine($"Left channel {e.Channel}");

            if (e.Channel == TwitchClientManager.PrimaryChannelName)
            {
                TwitchClientManager.PrimaryChannelName = TwitchClientManager.Client.JoinedChannels?[0].Channel ?? null;
                Writer.WriteLine($"Primary channel updated to {TwitchClientManager.PrimaryChannelName}");
            }
        }
Пример #13
0
        /// <summary>
        /// Invokes the left channel.
        /// </summary>
        /// <param name="client">The client.</param>
        /// <param name="botUsername">The bot username.</param>
        /// <param name="channel">The channel.</param>
        public static void InvokeLeftChannel(this TwitchClient client, string botUsername, string channel)
        {
            OnLeftChannelArgs model = new OnLeftChannelArgs()
            {
                BotUsername = botUsername,
                Channel     = channel
            };

            client.RaiseEvent("OnLeftChannel", model);
        }
Пример #14
0
 private void Client_OnLeftChannel(object sender, OnLeftChannelArgs e)
 {
     try
     {
         GetChannelProcessor(e.Channel)?.OnLeftChannel(sender);
     }
     catch (Exception ex)
     {
         Logger.Instance.Error($"[{0}] Unchaught exception: {ex.Info()}", MethodBase.GetCurrentMethod().Name);
     }
 }
Пример #15
0
 private void Client_OnLeftChannel(object sender, OnLeftChannelArgs e)
 {
     logger.Information($"{e.BotUsername} left Channel {e.Channel}");
     bus.Publish(new TwitchChannelLeftEvent(e.Channel));
 }
Пример #16
0
 private void OnTwitchLeftChannel(object sender, OnLeftChannelArgs e)
 {
     _logger.LogWarning("Leaving channel! : " + e.Channel);
 }
Пример #17
0
        private static void Client_OnLeftChannel(object sender, OnLeftChannelArgs e)
        {
            string onlineMessage = $"RazBot has disconnected from Twitch [{e.Channel}]";

            BotTools.LogLine($"RazBot: {onlineMessage}");
        }
Пример #18
0
 private void Client_OnLeftChannel(object sender, OnLeftChannelArgs e)
 {
     Console.WriteLine(TwitchInfo.BotUsername + "has left " + TwitchInfo.ChannelName);
     client.SendMessage(e.Channel, "Peace out!");
 }
Пример #19
0
 private void Client_OnLeftChannel(object sender, OnLeftChannelArgs e) => Console.WriteLine($"{DateTime.UtcNow.ToString(CultureInfo.InvariantCulture)}: Completed leaving the channel {e.Channel}");
Пример #20
0
 /// <summary>
 /// Passes <see cref="OnLeftChannel"/> events down to subscribed plugins.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">An <see cref="OnLeftChannelArgs"/> object.</param>
 private void TwitchClient_OnLeftChannel(object sender, OnLeftChannelArgs e) => this.OnLeftChannel?.Invoke(this, e);
Пример #21
0
 private void ClientOnOnLeftChannel(object sender, OnLeftChannelArgs e)
 {
     Debug.Log($"[Client] Left channel {e.Channel}, reconnecting");
     _client.Reconnect();
 }
Пример #22
0
 private void Client_OnLeftChannel(object sender, OnLeftChannelArgs e)
 {
     LogUtil.LogText($"[{client.TwitchUsername}] - Left channel {e.Channel}");
     client.JoinChannel(e.Channel);
 }
Пример #23
0
 private void ConnectButton_OnLeftChannel(object sender, OnLeftChannelArgs e)
 {
     ChangeButtonLayout("Connect", Color.green, true);
 }
 // Twitch events.
 private void Twitch_OnLeftChannel(object sender, OnLeftChannelArgs e)
 {
     // Leaving the channel does not happen here.
     // This happens in the RemoveViewer method.
     _logger.LogInformation($"Left Twitch Channel {e.Channel}");
 }
Пример #25
0
 /// <summary>
 /// Called when the Twitch bot has left the channel.
 /// </summary>
 private void Client_OnLeftChannel(object sender, OnLeftChannelArgs e)
 {
     Console.WriteLine($"[{e.Channel}] {e.BotUsername} has left the channel.");
     client.SendMessage(e.Channel, $"{e.BotUsername} is leaving the channel.");
 }
Пример #26
0
 private void _client_OnLeftChannel(object sender, OnLeftChannelArgs e)
 {
 }
Пример #27
0
 private void onLeftChannel(object sender, OnLeftChannelArgs e)
 {
     populateLeaveChannelsDropdown();
 }
Пример #28
0
 private void onLeftChannel(object sender, OnLeftChannelArgs e)
 {
     client.SendMessage("Leaving Channel " + e.Channel);
 }
Пример #29
0
 private async void TwitchOnLeftChannel(object sender, OnLeftChannelArgs e)
 {
     await Program.BotEvents.RaiseTwitchOnChannelLeave(e.Channel, e.BotUsername);
 }
Пример #30
0
 private void OnLeftChannel(object sender, OnLeftChannelArgs e)
 {
     Console.WriteLine($"{e.BotUsername} disconnected from channel #{e.Channel}.");
 }