async void BanWorker(TwitchChannel chan, TwitchUser user) { while (!chan.Ban(user) && 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); } } } }