コード例 #1
0
 async void BanWorker(TwitchChannel chan, TwitchUser user)
 {
     while (!chan.Ban(user) && chan.IsJoined)
     {
         await Task.Delay(250);
     }
 }
コード例 #2
0
 private static async void TimeoutUserList(int duration, TwitchChannel channel, TwitchUser[] users)
 {
     foreach (var user in users)
     {
         if (duration == -1)
         {
             while (!channel.Ban(user))
             {
                 await Task.Delay(250);
             }
         }
         else
         {
             while (!channel.Timeout(user, duration))
             {
                 await Task.Delay(250);
             }
         }
     }
 }