コード例 #1
0
ファイル: Bot.cs プロジェクト: vferreira-git/Twitch-bot
 private void Client_Hosting(object sender, OnNowHostingArgs e)
 {
     if (Settings.AnnounceNowHosting)
     {
         client.SendMessage(e.Channel, $"{e.HostedChannel} {Settings.Messages.mNowHosting}");
     }
 }
コード例 #2
0
        /// <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);
        }
コード例 #3
0
        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);
            }
        }
コード例 #4
0
ファイル: Form1.cs プロジェクト: kouweizhong/TwitchLib
 private void onNowHosting(object sender, OnNowHostingArgs e)
 {
     MessageBox.Show($"The joined channel '{e.Channel}' is now hosting {e.HostedChannel}");
 }
コード例 #5
0
 /// <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);
コード例 #6
0
ファイル: DrakeBot.cs プロジェクト: curin/AzureDrakeBot
 private void _client_OnNowHosting(object sender, OnNowHostingArgs e)
 {
 }
コード例 #7
0
 /// <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}");
 }