async void TimeoutWorker(TwitchChannel chan, TwitchUser user, int duration) { if (duration < 1) { duration = 1; } while (!chan.Timeout(user, duration) && chan.IsJoined) { await Task.Delay(250); } }
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); } } } }