private void Client_Hosting(object sender, OnNowHostingArgs e) { if (Settings.AnnounceNowHosting) { client.SendMessage(e.Channel, $"{e.HostedChannel} {Settings.Messages.mNowHosting}"); } }
/// <summary> /// Invokes the now hosting. /// </summary> /// <param name="client">The client.</param> /// <param name="channel">The channel.</param> /// <param name="hostedChannel">The hosted channel.</param> public static void InvokeNowHosting(this TwitchClient client, string channel, string hostedChannel) { OnNowHostingArgs model = new OnNowHostingArgs() { Channel = channel, HostedChannel = hostedChannel }; client.RaiseEvent("OnNowHosting", model); }
private void OnNowHosting(object sender, OnNowHostingArgs e) { string content = ""; content = "<div><span style=\"color:#A4A0A0; font-family:Arial,Helvetica,sans-serif; font-size:10pt;\">" + e.Channel + " is now hosting " + e.HostedChannel + "</span></div>"; if (webChat.InvokeRequired) { Action act = () => this.webChat.Document.Body.InnerHtml += content; webChat.Invoke(act); act = () => ScrollToBottom(); webChat.Invoke(act); } }
private void onNowHosting(object sender, OnNowHostingArgs e) { MessageBox.Show($"The joined channel '{e.Channel}' is now hosting {e.HostedChannel}"); }
/// <summary> /// Passes <see cref="OnNowHosting"/> events down to subscribed plugins. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">An <see cref="OnNowHostingArgs"/> object.</param> private void TwitchClient_OnNowHosting(object sender, OnNowHostingArgs e) => this.OnNowHosting?.Invoke(this, e);
private void _client_OnNowHosting(object sender, OnNowHostingArgs e) { }
/// <summary> /// Called when the channel is now hosting another channel. /// </summary> private void Client_OnNowHosting(object sender, OnNowHostingArgs e) { Console.WriteLine($"[{e.Channel}] Now hosting {e.HostedChannel}."); client.SendMessage(e.Channel, $"{e.Channel} is now hosting {e.HostedChannel}"); }