public void BanGroupMember(string toGroup, string toQq, TimeSpan duration) { var durationTotalSeconds = (long)duration.TotalSeconds; if (durationTotalSeconds <= 0) { throw new ArgumentOutOfRangeException(nameof(duration)); } _coolQApi.CQ_setGroupBan(AuthCode, Convert.ToInt64(toGroup), Convert.ToInt64(toQq), durationTotalSeconds); }