Class used to throttle chat and whsiper messages to enforce guidelines.
Exemple #1
0
        internal void Connect()
        {
            Console.WriteLine("Connecting");

            MessageThrottler myMessageThrottler = new TwitchLib.Services.MessageThrottler(client, 15, TimeSpan.FromSeconds(30));
            MessageThrottler myWhisperThrottler = new TwitchLib.Services.MessageThrottler(client, 15, TimeSpan.FromSeconds(30));

            client = new TwitchClient(credentials, Resources.TwitchInfo.ChannelName, logging: false);

            client.OnLog             += Client_OnLog;
            client.OnConnectionError += Client_OnConnectionError;
            client.OnMessageReceived += Client_OnMessageReceived;
            client.OnUserJoined      += Client_OnUserJoined;
            client.OnUserLeft        += Client_OnUserLeft;
            InitTimer();
            client.Connect();

            twitchAPI.Settings.ClientId = Resources.TwitchInfo.ClientID;
        }