Exemplo n.º 1
0
 private static void ClientUsers(object sender, OnUserStateChangedArgs e)
 {
     TwitchChatForm.Instance.Invoke(new Action(() =>
     {
         TwitchChatForm.Instance.listBox1.Items.Add(e.UserState.DisplayName);
     }));
 }
Exemplo n.º 2
0
        /// <summary>
        /// Invokes the user state changed.
        /// </summary>
        /// <param name="client">The client.</param>
        /// <param name="badges">The badges.</param>
        /// <param name="colorHex">The color hexadecimal.</param>
        /// <param name="displayName">The display name.</param>
        /// <param name="emoteSet">The emote set.</param>
        /// <param name="channel">The channel.</param>
        /// <param name="isSubscriber">if set to <c>true</c> [is subscriber].</param>
        /// <param name="isModerator">if set to <c>true</c> [is moderator].</param>
        /// <param name="userType">Type of the user.</param>
        public static void InvokeUserStateChanged(this TwitchClient client, List <KeyValuePair <string, string> > badges, List <KeyValuePair <string, string> > badgeInfo, string colorHex, string displayName,
                                                  string emoteSet, string channel, bool isSubscriber, bool isModerator, UserType userType)
        {
            OnUserStateChangedArgs model = new OnUserStateChangedArgs()
            {
                UserState = new UserState(badges, badgeInfo, colorHex, displayName, emoteSet, channel, isSubscriber, isModerator, userType)
            };

            client.RaiseEvent("OnUserStateChanged", model);
        }
Exemplo n.º 3
0
        private void Client_OnUserStateChanged(object?sender, OnUserStateChangedArgs e)
        {
            if (e.UserState.IsModerator || e.UserState.Channel.ToLower() == client.TwitchUsername.ToLower())
            {
                return;
            }

            owner.MissingPermissions(e.UserState.Channel);

            ManualDisconnect = true;
            client.Disconnect();
        }
Exemplo n.º 4
0
 private void onUserStateChanged(object sender, OnUserStateChangedArgs e)
 {
     MessageBox.Show($"Display Name: {e.UserState.DisplayName}\nSubscriber: {e.UserState.Subscriber}\nModerator: {e.UserState.Moderator}");
 }
Exemplo n.º 5
0
 /// <summary>
 /// Passes <see cref="OnUserStateChanged"/> events down to subscribed plugins.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">An <see cref="OnUserStateChangedArgs"/> object.</param>
 private void TwitchClient_OnUserStateChanged(object sender, OnUserStateChangedArgs e) => this.OnUserStateChanged?.Invoke(this, e);
Exemplo n.º 6
0
 private void _client_OnUserStateChanged(object sender, OnUserStateChangedArgs e)
 {
 }